]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
Add missing ATTRIBUTE_UNUSED for ix86_libc_has_fast_function.
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
83454be6 12019-05-18 Jonathan Wakely <jwakely@redhat.com>
2
3 PR libstdc++/90520
4 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
5 Raise exception if unique_ptr tuple member has unknown structure.
6 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
7 Adjust worker to support new __uniq_ptr_data base class. Do not
8 assume field called _M_head_impl is the first tuple element.
9
18788b25 102019-05-17 François Dumont <fdumont@gcc.gnu.org>
11
12 * include/bits/stl_deque.h
13 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
14 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
15 (_Deque_base::_Deque_impl_data): New.
16 (_Deque_base::_Deque_impl): Inherit latter.
17 (_Deque_base::_Deque_impl::_M_swap_data): Move...
18 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
19 (_Deque_base::_Deque_impl()): Add noexcept qualification.
20 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
21 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
22 (deque<>::deque()): Default.
23 (deque<>::deque(deque&&)): Default.
24 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
25 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
26 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
27 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
28 _M_range_initialize.
29 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
30 (deque<>::resize(size_type, const value_type&)): Share a single
31 implementation.
32 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
33 _M_range_insert_aux.
34 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
35 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
36 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
37 * testsuite/23_containers/deque/allocator/default_init.cc: New.
38
f02e0f08 392019-05-17 Jonathan Wakely <jwakely@redhat.com>
40
9bf46b60 41 PR libstdc++/90246
42 * include/std/variant (holds_alternative, get, get_if): Improve
43 static assertion messages.
44 (bad_variant_access::bad_variant_access()): Change default message.
45 (__throw_bad_variant_access(bool)): New overload.
46 (get): Use new overload.
47 (visit, visit<R>): Improve exception message.
48
ac93735b 49 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
50 targets. Add more cases from P0608R3.
51 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
52
8d58624a 53 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
54 * include/experimental/type_traits (is_detected_exact)
55 (is_detected_exact_v): Likewise.
56 * include/pstl/execution_defs.h (is_execution_policy)
57 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
58 * include/pstl/execution_impl.h (__policy_traits): Likewise.
59 * testsuite/17_intro/names.cc: Check for more non-reserved names.
60 * testsuite/experimental/names.cc: New test.
61
5d3695d0 62 PR libstdc++/85965
63 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
64 assertions from the destructor.
65 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
66 Move static_assert for hash function to here.
67 (_Hash_table_base::_M_equals): Move static_assert for equality
68 predicate to here.
69 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
70 Remove.
71 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
72 the value directly instead of calling _S_value.
73 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
74 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
75 _S_key(_Const_Link_type).
76 * testsuite/23_containers/set/85965.cc: Check construction,
77 destruction, assignment and size() do not trigger the assertions.
78 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
79 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
80 expected errors.
81 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
82 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
83 * testsuite/23_containers/set/48101_neg.cc: Likewise.
84 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
85 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
86 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
87 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
88
2e431291 89 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
90 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
91 in C++11.
92
f02e0f08 93 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
94 P1165R1 entries.
95 * doc/html/*: Regenerate.
96 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
97 of decay_t (P0777R1).
98
0cde8d2e 992019-05-17 François Dumont <fdumont@gcc.gnu.org>
100
101 Move from state of allocators (LWG2593)
102 * include/bits/stl_deque.h
103 (_Deque_base(_Deque_base&&, false_type)): Remove.
104 (_Deque_base(_Deque_base&&, true_type)): Remove.
105 (_Deque_base(_Deque_base&&)): Adapt.
106 (_Deque_base::_M_move_impl()): Remove.
107 * testsuite/util/testsuite_allocator.h
108 (propagating_allocator(propagating_allocator&&)): Preserve move from
109 state.
110 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
111 Adapt.
112 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
113 Adapt.
114 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
115 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
116 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
117 Adapt.
118 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
119 Adapt.
120 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
121 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
122 (test02): Adapt.
123 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
124 (test02): Adapt.
125 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
126 (test02): Adapt.
127 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
128 (test02): Adapt.
129 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
130 Adapt.
131 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
132 Adapt.
133 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
134 (test02): Adapt.
135 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
136 (test02): Adapt.
137
68605c77 1382019-05-16 Jonathan Wakely <jwakely@redhat.com>
139
4a0707ea 140 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
141 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
142
a8a0d164 143 * include/std/variant (__overload_set): Remove.
144 (_Arr): New helper.
145 (_Build_FUN): New class template to define a single FUN overload,
146 with specializations to prevent unwanted conversions, as per P0608R3.
147 (_Build_FUNs): New class template to build an overload set of FUN.
148 (_FUN_type): New alias template to perform overload resolution.
149 (__accepted_type): Use integer_constant base for failure case. Use
150 _FUN_type for successful case.
151 (variant::__accepted_index): Use _Tp instead of _Tp&&.
152 (variant::variant(_Tp&&)): Likewise.
153 (variant::operator=(_Tp&&)): Likewise.
154
facad3f4 155 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
156 Replace raw visitation with a runtime check for the valueless state
157 and a non-raw visitor.
158 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
159 (variant::index()): Remove branch.
160 (variant::swap(variant&)): Use valueless_by_exception() instead of
161 comparing the index to variant_npos, and add likelihood attribute.
162
47376ba0 163 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
164 (_Hashtable_base::_Equal_hash_code): Define new class template.
165 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
166 _Equal_helper.
167
81262974 168 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
169 Replace with _M_get non-static member function.
170 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
171 member function.
172 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
173 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
174
68605c77 175 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
176 _S_get accessors for members in EBO helpers.
177 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
178 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
179 overloads.
180 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
181 helpers.
182 (_Hashtable_base::_M_eq()): Remove non-const overload.
183
970ec9ab 1842019-05-15 Jonathan Wakely <jwakely@redhat.com>
185
186 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
187
54f34abb 1882019-05-14 Jonathan Wakely <jwakely@redhat.com>
189
190 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
191 Fix return value.
192
0fd03648 1932019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
194
195 * config/os/solaris/solaris2.10: Move to ...
196 * config/os/solaris: ... this.
197 * configure.host (os_include_dir): Adapt.
198 (abi_baseline_pair): Remove Solaris 10 handling.
199 * config/abi/post/i386-solaris2.10: Remove.
200 * config/abi/post/sparc-solaris2.10: Remove.
201 * config/abi/post/i386-solaris2.11: Rename to ...
202 * config/abi/post/i386-solaris: ... this.
203 * config/abi/post/sparc-solaris2.11: Rename to ...
204 * config/abi/post/sparc-solaris: ... this.
205
206 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
207 workaround.
208
209 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
210 xfail.
211
f03f26fa 2122019-05-14 Jonathan Wakely <jwakely@redhat.com>
213
214 * include/std/variant (__visit_with_index): Remove typedef.
215 (__deduce_visit_result): New tag type.
216 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
217 visitation of possibly-valueless variants, forwarding to __do_visit
218 with the relevant tag type.
219 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
220 and make lambda return void.
221 (__variant_construct): Likewise.
222 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
223 __raw_idx_visit and make lambda return void.
224 (_Multi_array::__untag_result): Add metafunction to check the function
225 pointer type for a tag type that dictates the kind of visitation.
226 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
227 Use decltype(auto) instead of tagged function pointer type.
228 (__gen_vtable_impl): Remove bool non-type parameter and unused
229 _Variant_tuple parameter.
230 (__gen_vtable_impl::__visit_invoke_impl): Remove.
231 (__gen_vtable_impl::__do_visit_invoke): Remove.
232 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
233 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
234 for the visit<R> case, rather than dispatching to separate functions.
235 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
236 lambda return void.
237 (variant::swap): Likewise.
238 (__do_visit): Replace two non-type template parameters with a single
239 type parameter, so that the caller must specify the visitor's return
240 type (or one of the tag types).
241 (visit): Deduce a return type from the visitor and use the
242 __deduce_visit_result tag to enforce that all overloads return the
243 same type.
244 (visit<R>): Call __do_visit<R> with explicit result type.
245 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
246 lambda return void.
247
b8dcd41e 2482019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
249
250 nonesuch is insufficiently useless (lwg2996)
251 * include/std/type_traits (struct __nonesuch): Added private base
252 class to make __nonesuch not an aggregate and removed deleted default
253 constructor.
254 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
255 (operator=(const pair&)): Use __nonesuch instead of
256 __nonesuch_no_braces.
257 (operator=(pair&&)): Likewise
258 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
259 of __nonesuch_no_braces.
260 (operator=(tuple&&)): Likewise
261 * include/experimental/type_traits (struct nonesuch): Added private
262 base class to make nonesuch not an aggregate and removed deleted
263 default constructor.
264 * testsuite/20_util/nonesuch/nonesuch.cc: New.
265 * testsuite/experimental/type_traits/nonesuch.cc: New.
266
e0bcd31d 2672019-05-14 Jonathan Wakely <jwakely@redhat.com>
268
3ff2b640 269 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
270 (_Function_handler): Remove partial specializations for void return
271 types and pointers to member.
272 (_Function_handler::_M_manager): Adapt to removal of
273 _Simple_type_wrapper.
274 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
275 * include/std/functional (_Bind_result::__enable_if_void)
276 (_Bind_result::__disable_if_void): Remove sfinae helpers.
277 (_Bind_result::__call): Use __invoke_r and remove overloads for void
278 return types.
279 * include/std/future (__future_base::_Task_state::_M_run)
280 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
281 change return type of lambda expressions.
282
a858e2a4 283 * include/bits/invoke.h (__invoke_r): Define new function implementing
284 the INVOKE<R> pseudo-function.
285 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
286 * testsuite/20_util/function_objects/invoke/2.cc: New test.
287
2cfc6a76 288 * include/std/type_traits (__is_nt_convertible_helper): Define it
289 unconditionally, not only for C++20.
290 (__is_nothrow_convertible): Define internal trait for use in C++11.
291 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
292 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
293 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
294 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
295 that has nothrow explicit conversion but potentially-throwing implicit
296 conversion.
297 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
298 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
299 function to only consider implicit conversions.
300 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
301
e0d65374 302 * include/std/iterator: Include <iosfwd> instead of <istream> and
303 <ostream>.
304
4a182e12 305 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
306 Remove unused, non-standard function.
307
d4a9b293 308 * include/bits/regex.h (match_results::max_size()): Adjust return
309 value to account for prefix/suffix/unmatched subs.
310 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
311 reset the contained sub matches.
312 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
313 function to set result state following a failed match.
314 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
315 sub_match states after _M_resize. Use _M_establish_failed_match.
316
e0bcd31d 317 PR libstdc++/69724
318 * include/std/thread (thread::_State_impl, thread::_S_make_state):
319 Replace single _Callable parameter with variadic _Args pack, to
320 forward them directly to the tuple of decayed copies.
321 * testsuite/30_threads/thread/cons/69724.cc: New test.
322
872d7a1f 3232019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
324
325 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
326 * include/bits/basic_string.h: (operator=(const basic_string&):
327 Move allocator decision to assign.
328 (assign(const basic_string&)): Move allocator decision here.
329 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
330 Add tests.
331 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
332 Add tests.
333
67dff8a4 3342019-05-14 Jonathan Wakely <jwakely@redhat.com>
335
155856f9 336 * testsuite/util/testsuite_allocator.h (memory_resource)
337 (default_resource_mgr): Fix indentation.
338
94e98eda 339 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
340 Use operator-> to access raw pointer member.
341 * testsuite/23_containers/vector/59829.cc: Likewise.
342 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
343 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
344 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
345 for tests.
346 (PointerBase, PointerBase_void): Derive from NullablePointer and use
347 its constructors and equality operators. Change converting
348 constructors to use operator-> to access private member of the other
349 pointer type.
350 (PointerBase_void::operator->()): Add, for access to private member.
351 (operator-(PointerBase, PointerBase)): Change to hidden friend.
352 (operator==(PointerBase, PointerBase)): Remove.
353 (operator!=(PointerBase, PointerBase)): Remove.
354
8ac285f1 355 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
356 not assume field called _M_head_impl is the first tuple element.
357 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
358 implementation more accurate.
359 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
360 empty pointer type and non-empty deleter.
361
67dff8a4 362 LWG 2899 - Make is_move_constructible correct for unique_ptr
363 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
364 move assignment operator.
365 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
366 (__uniq_ptr_data): New class template with conditionally deleted
367 special members.
368 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
369 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
370 constructor and move assignment operator as defaulted.
371 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
372 __uniq_ptr_impl::release().
373 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
374 to __uniq_ptr_impl::reset(pointer).
375 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
376 Check for new __uniq_ptr_data type.
377 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
378
6818ab51 3792019-05-13 Jonathan Wakely <jwakely@redhat.com>
380
fecfaafd 381 PR libstdc++/90454.cc path construction from void*
382 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
383 pointers to void are rejected as well as void.
384 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
385 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
386 pointers to void.
387 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
388
6818ab51 389 * doc/xml/manual/policy_data_structures.xml: Comment out stray
390 <remark> elements. Fix formatting of bibliography references.
391
8967657e 3922019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
393
394 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
395
8dd55415 3962019-05-13 Jonathan Wakely <jwakely@redhat.com>
ca8ead92 397
b6cabd65 398 Remove Profile Mode, deprecated since 7.1.0
399 * doc/Makefile.am: Remove XML file for profile mode docs.
400 * doc/Makefile.in: Regenerate.
401 * doc/xml/authors.xml: Remove authors of profile mode docs.
402 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
403 mode.
404 * doc/xml/manual/debug.xml: Likewise.
405 * doc/xml/manual/evolution.xml: Document removal of profile mode.
406 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
407 * doc/xml/manual/spine.xml: Remove profile mode author credit.
408 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
409 directive.
410 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
411 macro.
412 * doc/html/*: Regenerate.
413 * include/Makefile.am: Remove profile mode headers.
414 * include/Makefile.in: Regenerate.
415 * include/bits/c++config (std::__profile): Remove namespace.
416 [_GLIBCXX_PROFILE]: Remove checks for macro.
417 * include/profile/array: Remove.
418 * include/profile/base.h: Remove.
419 * include/profile/bitset: Remove.
420 * include/profile/deque: Remove.
421 * include/profile/forward_list: Remove.
422 * include/profile/impl/profiler.h: Remove.
423 * include/profile/impl/profiler_algos.h: Remove.
424 * include/profile/impl/profiler_container_size.h: Remove.
425 * include/profile/impl/profiler_hash_func.h: Remove.
426 * include/profile/impl/profiler_hashtable_size.h: Remove.
427 * include/profile/impl/profiler_list_to_slist.h: Remove.
428 * include/profile/impl/profiler_list_to_vector.h: Remove.
429 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
430 * include/profile/impl/profiler_node.h: Remove.
431 * include/profile/impl/profiler_state.h: Remove.
432 * include/profile/impl/profiler_trace.h: Remove.
433 * include/profile/impl/profiler_vector_size.h: Remove.
434 * include/profile/impl/profiler_vector_to_list.h: Remove.
435 * include/profile/iterator_tracker.h: Remove.
436 * include/profile/list: Remove.
437 * include/profile/map: Remove.
438 * include/profile/map.h: Remove.
439 * include/profile/multimap.h: Remove.
440 * include/profile/multiset.h: Remove.
441 * include/profile/ordered_base.h: Remove.
442 * include/profile/set: Remove.
443 * include/profile/set.h: Remove.
444 * include/profile/unordered_base.h: Remove.
445 * include/profile/unordered_map: Remove.
446 * include/profile/unordered_set: Remove.
447 * include/profile/vector: Remove.
448 * scripts/run_doxygen: Do not process profile mode headers.
449 * testsuite/23_containers/array/element_access/60497.cc: Don't use
450 profile mode type.
451 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
452 Remove dg-skip-if for profile mode.
453 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
454 preprocessor check for profile mode.
455 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
456 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
457 for profile mode.
458 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
459 Likewise.
460 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
461 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
462 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
463 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
464 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
465 Likewise.
466 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
467 Likewise.
468 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
469 Likewise.
470 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
471 Likewise.
472 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
473 preprocessor check for profile mode.
474 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
475 Likewise.
476 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
477 Remove dg-skip-if for profile mode.
478 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
479 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
480 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
481 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
482 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
483 * testsuite/Makefile.am: Remove profile_flags variable and
484 * testsuite/Makefile.am: Remove profile_flags variable and
485 check-profile target.
486 * testsuite/Makefile.in: Regenerate.
487 * testsuite/ext/profile/all.cc: Remove.
488 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
489 * testsuite/ext/profile/profiler_algos.cc: Remove.
490 * testsuite/ext/profile/replace_new.cc: Remove.
491 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
492 preprocessor check for profile mode.
493 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
494 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
495 (check_v3_target_normal_mode): Do not check for profile mode macro.
496 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
497 profile mode.
498 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
499 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
500 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
501 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
502 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
503 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
504 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
505 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
506 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
507 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
508
ca8ead92 509 Remove array_allocator extension, deprecated since 4.9.0
510 * doc/xml/manual/allocator.xml: Remove documentation for
511 array_allocator.
512 * doc/xml/manual/evolution.xml: Document array_allocator removal.
513 * doc/xml/manual/using.xml: Remove header from documentation.
514 * include/Makefile.am: Remove <ext/array_allocator.h> header.
515 * include/Makefile.in: Regenerate.
516 * include/ext/array_allocator.h: Remove.
517 * include/precompiled/extc++.h: Do not include removed header.
518 * testsuite/ext/array_allocator/1.cc: Remove.
519 * testsuite/ext/array_allocator/2.cc: Remove.
520 * testsuite/ext/array_allocator/26875.cc: Remove.
521 * testsuite/ext/array_allocator/3.cc: Remove.
522 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
523 * testsuite/ext/array_allocator/check_delete.cc: Remove.
524 * testsuite/ext/array_allocator/check_new.cc: Remove.
525 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
526 * testsuite/ext/headers.cc: Do not include removed header.
527
64b2700c 5282019-05-11 François Dumont <fdumont@gcc.gnu.org>
529
530 * include/bits/stl_bvector.h
531 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
532 Make hidden friend.
533 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
534 Likewise.
535 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
536 Likewise.
537 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
538 Likewise.
539 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
540 Likewise.
541 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
542 Likewise.
543 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
544 Likewise.
545 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
546 copy elision.
547 (_Bit_iterator::operator-(difference_type)): Likewise.
548 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
549 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
550 NRVO copy elision.
551 (_Bit_const_iterator::operator-(difference_type)): Likewise.
552 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
553
de3f1d9a 5542019-05-10 Jonathan Wakely <jwakely@redhat.com>
555
eb1be9e7 556 PR libstdc++/81266
557 * testsuite/util/thread/all.h: Do not use remove_pointer for
558 std::thread::native_handle_type.
559
5c6334a5 560 PR libstdc++/90397
561 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
562 (_Variant_storage<true, Types...>::_M_reset()))
563 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
564 (__get_storage): Likewise.
565 (variant): Add noexcept to friend declarations for __get and
566 __get_storage.
567
3e5c91bd 568 PR libstdc++/90388
569 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
570 Use _Require for constraints.
571 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
572 per the standard.
573 (__uniq_ptr_hash): New base class with conditionally-disabled call
574 operator.
575 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
576 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
577 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
578
de3f1d9a 579 * include/bits/shared_ptr.h: Improve docs.
580 * include/bits/shared_ptr_base.h: Likewise.
581 * include/bits/stl_uninitialized.h: Likewise.
582 * include/bits/unique_ptr.h: Likewise.
583 * libsupc++/new: Likewise.
584
d084c5ba 5852019-05-09 François Dumont <fdumont@gcc.gnu.org>
586
587 * include/bits/stl_deque.h
588 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
589 Make hidden friend.
590 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
591 Likewise.
592 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
593 Likewise.
594 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
595 Likewise.
596 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
597 Likewise.
598 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
599 Likewise.
600 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
601 copy elision.
602 (_Deque_iterator<>::operator-(difference_type)): Likewise.
603
0f61cb49 6042019-05-08 François Dumont <fdumont@gcc.gnu.org>
605
606 PR libstdc++/90277
607 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
608 (test01): Reserve for number of insertions to avoid rehash during test.
609 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
610 (test01): Likewise.
611 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
612 (test01): Likewise.
613 (test02): Likewise.
614 (test03): Likewise.
615
c800ee48 6162019-05-08 Jonathan Wakely <jwakely@redhat.com>
617
618 * include/experimental/bits/fs_path.h: Improve docs.
619 * include/experimental/bits/net.h: Fix wrong header name in comment.
620 Do not document implementation details.
621 * include/experimental/netfwd: Fix doxygen grouping.
622
b103d23d 6232019-05-07 Jonathan Wakely <jwakely@redhat.com>
624
aa371af3 625 * include/bits/stl_pair.h: Improve docs.
626 * include/std/tuple: Likewise.
627
dceea60f 628 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
629 inline namespace.
630 * include/std/chrono: Improve docs.
631 * include/std/ratio: Do not document implementation details.
632 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
633 line numbers.
634 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
635
a9ae69b5 636 PR libstdc++/89102
637 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
638 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
639 (__duration_common_type): New helper.
640 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
641 __duration_common_type.
642 (__timepoint_common_type_wrapper): Replace with ...
643 (__timepoint_common_type): New helper.
644 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
645 Use __time_point_common_type.
646 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
647 (__common_type_impl): If either argument is transformed by decay,
648 use the common_type of the decayed types.
649 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
650 decayed, use __do_common_type_impl to get the common_type.
651 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
652 (__do_member_type_wrapper, __member_type_wrapper)
653 (__expanded_common_type_wrapper): Remove.
654 (__common_type_pack, __common_type_fold): New helpers.
655 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
656 __member_type_wrapper and __expanded_common_type_wrapper.
657 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
658 Test zero-length template argument list.
659 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
660 Test single argument cases and argument types that should decay.
661 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
662 Adjust expected error.
663 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
664 dg-error lineno.
665 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
666 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
667 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
668
b103d23d 669 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
670
69be6ea5 6712019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
672
673 Make allocator propagation more consistent for
674 operator+(basic_string) (P1165R1)
675 * include/bits/basic_string.h
676 (operator+(basic_string&&, basic_string&&): Changed resulting
677 allocator to always be the one from the first parameter.
678 * include/bits/basic_string.tcc
679 (operator+(const _CharT*, const basic_string&)): Changed
680 resulting allocator to be SOCCC on the second parameter's allocator.
681 (operator+(_CharT, const basic_string&)): Likewise.
682 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
683 New.
684 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
685 New.
686
845d0fd6 6872019-05-07 Jonathan Wakely <jwakely@redhat.com>
688
29499715 689 * include/bits/regex.h: Improve docs.
690 * include/bits/regex.tcc: Do not document implementation details.
691
845d0fd6 692 * testsuite/19_diagnostics/error_code/hash.cc: New test.
693
3eec8b67 6942019-05-06 François Dumont <fdumont@gcc.gnu.org>
695
696 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
697 Add type printer for container types in std::__debug namespace.
698 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
699 (gdb-tests): Use distinct parameters for the type of test and use of
700 regex.
701 (gdb-test): Check for regex test even if 'whatis' test.
702 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
703 mode.
704 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
705 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
706 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
707 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
708 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
709 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
710 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
711
80175534 7122019-05-04 Jonathan Wakely <jwakely@redhat.com>
713
2d527eb0 714 * include/std/system_error (error_category): Fix comment.
715
84eda927 716 PR libstdc++/90299
717 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
718 argument is an empty path.
719 (absolute(const path&, error_code&)): Use invalid_argument as error
720 code instead of no_such_file_or_directory.
721 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
722 of non-existent paths and empty paths with both overloads of absolute.
723
98a3d630 724 * include/std/system_error (error_category, error_code)
725 (error_condition): Improve docs.
726 * libsupc++/exception: Add missing @addtogroup Doxygen command.
727 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
728 to class documentation. Suppress documentation for implementation
729 details.
730 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
731 Suppress documentation for implementation details.
732
80175534 733 * include/std/system_error (error_code): Remove friend declaration
734 for hash<error_code>.
735 (hash<error_code>::operator()): Use public member functions to access
736 value and category.
737 (hash<error_condition>::operator()): Use address of category, not
738 its object representation.
739 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
740 Use public member functions to access value and category.
741 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
742
476bdccf 7432019-05-04 François Dumont <fdumont@gcc.gnu.org>
744
745 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
746 * include/bits/hashtable_policy.h
747 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
748 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
749 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
750 smaller than input value rather than always greater. Preserve
751 _M_next_resize if called with 0 input. Use __builtin_floorl.
752 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
753 elements + number of insertions is greater than _M_next_resize. Start
754 with 11 buckets if not told otherwise. Use __builtin_floorl.
755 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
756 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
757 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
758 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
759 told otherwise. Use __builtin_floorl.
760 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
761 to also validate _Power2_rehash_policy.
762 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
763 Adapt.
764
2051f7c0 7652019-05-03 Jonathan Wakely <jwakely@redhat.com>
766
85015e21 767 PR libstdc++/61761
768 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
769 std::copysign.
770
2051f7c0 771 PR libstdc++/52119
772 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
773 overflow warning with -Wpedantic -Wsystem-headers.
774
c47265a8 7752019-05-02 Jonathan Wakely <jwakely@redhat.com>
776
9766cefe 777 PR libstdc++/90314
778 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
779 * include/bits/move.h (swap): Remove extra parentheses.
780
6bd15da3 781 * include/experimental/bits/lfts_config.h: Improve doc markup.
782 * include/experimental/optional: Improve docs.
783 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
784 (__constexpr_addressof): Remove.
785 (optional::operator->()): Use std::__addressof().
786 * include/std/optional (optional::operator->()): Adjust whitespace.
787 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
788 that operator-> is still constexpr with overloaded operator&. Change
789 to compile-only test.
790 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
791 compile-only test.
792
f4673ac1 793 * include/bits/shared_ptr.h: Improve docs.
794 * include/bits/shared_ptr_atomic.h: Likewise.
795 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
796
c88f1c9d 797 * include/bits/basic_string.h: Fix iterator/index confusion in
798 Doxygen comments.
799 * include/bits/range_access.h: Fix Doxygen warnings.
800 * include/bits/refwrap.h: Do not document implementation details.
801 (ref, cref): Group docs with reference_wrapper.
802 * include/std/fstream: Fix Doxygen markup.
803 * libsupc++/initializer_list (begin, end): Group docs with
804 initializer_list.
805
0276ef36 806 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
807
5ba27b7d 808 * include/bits/unique_lock.h: Fix/improve doxygen markup.
809 * include/std/mutex: Likewise.
810 * include/std/shared_mutex: Likewise.
811
c2046340 812 * include/bits/fs_dir.h: Fix/improve doxygen markup.
813 * include/bits/fs_fwd.h: Likewise.
814 * include/bits/fs_ops.h: Likewise.
815 * include/bits/fs_path.h: Likewise.
816 * include/std/filesystem: Likewise.
817
f73340aa 818 * include/experimental/bits/net.h: Fix/improve doxygen markup.
819 * include/experimental/buffer: Likewise.
820 * include/experimental/executor: Likewise.
821 * include/experimental/internet: Likewise.
822 * include/experimental/io_context: Likewise.
823 * include/experimental/net: Likewise.
824 * include/experimental/netfwd: Likewise.
825 * include/experimental/socket: Likewise.
826 * include/experimental/timer: Likewise.
827
b87d52bd 828 * doc/doxygen/doxygroups.cc: Move description of experimental group
829 here.
830 * include/experimental/algorithm: Add to libfund-ts doc group.
831 * include/experimental/any: Likewise. Do not document implementation
832 details.
833 * include/experimental/array: Add to libfund-ts doc group.
834 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
835 for Library Fundamentals.
836 * include/experimental/chrono: Add to libfund-ts doc group.
837 * include/experimental/deque: Likewise.
838 * include/experimental/forward_list: Likewise.
839 * include/experimental/functional: Likewise.
840 * include/experimental/iterator: Likewise.
841 * include/experimental/list: Likewise.
842 * include/experimental/map: Likewise.
843 * include/experimental/memory: Likewise.
844 * include/experimental/memory_resource: Likewise. Improve docs.
845 details.
846 * include/experimental/numeric: Add to libfund-ts doc group.
847 * include/experimental/optional: Likewise.
848 * include/experimental/propagate_const: Likewise.
849 * include/experimental/random: Likewise.
850 * include/experimental/ratio: Likewise.
851 * include/experimental/regex: Likewise.
852 * include/experimental/set: Likewise.
853 * include/experimental/source_location: Likewise.
854 * include/experimental/string: Likewise.
855 * include/experimental/string_view: Likewise.
856 * include/experimental/system_error: Likewise.
857 * include/experimental/tuple: Likewise.
858 * include/experimental/type_traits: Likewise.
859 * include/experimental/unordered_map: Likewise.
860 * include/experimental/unordered_set: Likewise.
861 * include/experimental/utility: Likewise.
862 * include/experimental/vector: Likewise.
863 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
864 * testsuite/experimental/array/neg.cc: Adjust dg-error.
865 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
866 Likewise.
867 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
868 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
869 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
870 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
871 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
872
07894d48 873 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
874 * include/experimental/bits/fs_fwd.h: Improve docs.
875 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
876 * include/experimental/bits/fs_path.h: Likewise.
877 (path, filesystem_error, u8path): Improve docs.
878 * include/experimental/filesystem: Link to docs for TS.
879
cd877474 880 * config/allocator/new_allocator_base.h (__allocator_base): Add
881 workaround for Doxygen bug #6945.
882 * include/std/memory: Improve docs. Define group for pointer safety.
883 * include/std/scoped_allocator: Improve docs. Use "undocumented"
884 conditional to suppress documentation for implementation details.
885
72e8cf41 886 * include/bits/specfun.h: Improve docs.
887 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
888 and namespaces.
889
633c66f0 890 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
891 (std::experimental): Add docs.
892 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
893 namespace to nothing when generating docs.
894 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
895 * include/std/chrono (std::chrono): Likewise.
896 * include/std/functional (std::placeholders): Likewise.
897 * include/std/thread (std::this_thread): Likewise.
898
17035a16 899 * include/parallel/settings.h: Fix Doxygen markup.
900
6de90d17 901 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
902 anything unless PB_DS_CLASS_C_DEC is defined.
903 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
904 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
905 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
906 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
907 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
908 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
909 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
910 Likewise.
911 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
912 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
913 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
914 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
915 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
916 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
917 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
918 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
919 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
920 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
921 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
922 Likewise.
923 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
924 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
925 Likewise.
926 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
927 Likewise.
928
c47265a8 929 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
930 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
931 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
932 Doxygen expands.
933
269f393a 9342019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
935
936 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
937 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
938 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
939 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
940 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
941 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
942 Likewise.
943 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
944 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
945 Likewise.
946
c64aa5a2 9472019-05-01 Jonathan Wakely <jwakely@redhat.com>
948
949 PR libstdc++/61761
950 * include/std/complex (__complex_proj): Return parameter unchanged.
951 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
952 floating-point types to take std::complex arguments.
953 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
954 floating-point types.
955 * testsuite/26_numerics/complex/proj.cc: New test.
956
9d5de90f 9572019-04-30 Jakub Jelinek <jakub@redhat.com>
958
959 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
960 to _Lock_policyE[012].
961 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
962
612b2ae7 9632019-04-30 Jonathan Wakely <jwakely@redhat.com>
964
965 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
966 macros accidentally left in.
967 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
968 unnecessary -lstdc++fs option. Fix test for mingw.
969 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
970 Fix test for mingw.
971
55843567 9722019-04-30 Jakub Jelinek <jakub@redhat.com>
973
974 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
975
c5aaf0af 9762019-04-29 Jonathan Wakely <jwakely@redhat.com>
977
d9375e49 978 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
979
744a3010 980 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
981 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
982
e3600f25 983 PR libstdc++/71312
984 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
985
4b7f4f12 986 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
987 attribute.
988
94ed6c0a 989 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
990 class template and partial specialization.
991
c5aaf0af 992 PR libstdc++/87982
993 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
994 an integral type.
995 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
996 functions to convert a value to an integral type.
997 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
998 (fill_n): Convert _Size parameter to an integral type.
999 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1000 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1001 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1002 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1003 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1004 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1005
ac8f540e 10062019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
a4360611 1007
1008 Adding noexcept-specification on tuple constructors (LWG 2899)
1009 * libstdc++-v3/include/std/tuple:
1010 (tuple()): Add noexcept-specification.
1011 (tuple(const _Elements&...)): Likewise
1012 (tuple(_UElements&&...)): Likewise
1013 (tuple(const tuple<_UElements...>&)): Likewise
1014 (tuple(tuple<_UElements...>&&)): Likewise
1015 (tuple(const _T1&, const _T2&)): Likewise
1016 (tuple(_U1&&, _U2&&)): Likewise
1017 (tuple(const tuple<_U1, _U2>&): Likewise
1018 (tuple(tuple<_U1, _U2>&&): Likewise
1019 (tuple(const pair<_U1, _U2>&): Likewise
1020 (tuple(pair<_U1, _U2>&&): Likewise
1021 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1022
b9fe1c54 10232019-04-27 Marc Glisse <marc.glisse@inria.fr>
1024
1025 PR libstdc++/87106
1026 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1027 arguments with __restrict.
1028
a596cded 10292019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1030
1031 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1032
051e444d 10332019-04-26 Jonathan Wakely <jwakely@redhat.com>
1034
3c259ff8 1035 * include/experimental/bits/fs_path.h
1036 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1037 avoid redundant call to _S_convert_loc with non-const pointers.
1038
2f95fa8e 1039 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1040 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1041 * testsuite/21_strings/basic_string/hash/hash.cc
1042 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1043 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1044 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1045
46933618 1046 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1047 wstring::_M_replace_dispatch with more specific patterns.
1048 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1049 Create const std::string to avoid redundant call to _S_convert_loc
1050 with non-const pointers.
1051 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1052 avoid unnecessary basic_string::assign instantiations.
1053
051e444d 1054 * include/std/memory (__uses_alloc_args): Add string-literal to
1055 static_assert, to match the one in __uses_alloc.
1056 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1057 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1058 for recursive uses-allocator construction of nested pairs.
1059 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1060 comment.
1061
db1349a6 10622019-04-26 Jakub Jelinek <jakub@redhat.com>
1063
dd693c4a 1064 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1065 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1066 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1067 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1068
db1349a6 1069 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1070 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1071 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1072 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1073 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1074 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1075 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1076
f0a82465 10772019-04-25 Jonathan Wakely <jwakely@redhat.com>
1078
1079 PR libstdc++/90239
1080 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1081 * include/std/scoped_allocator [__cplusplus > 201703L]
1082 (scoped_allocator_adaptor::construct): Define in terms of
1083 uses_allocator_construction_args, as per P0591R4.
1084 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1085 * testsuite/util/testsuite_allocator.h: Remove name of unused
1086 parameter.
1087
fd1863e1 10882019-04-24 Jonathan Wakely <jwakely@redhat.com>
1089
9ed11778 1090 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1091 * doc/html/*: Regenerate.
1092
39b59bb9 1093 * include/bits/fs_path.h (operator<, operator<=, operator>)
1094 (operator>=, operator==, operator!=): Make hidden friends, as per
1095 LWG 3065.
1096 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1097 string type in test.
1098 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1099
dd3b7006 1100 * include/std/any (any::any(ValueType&&)): Use __and_v.
1101 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1102 Likewise.
1103
14710c9d 1104 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1105 as per P0777R1.
1106 * include/std/type_traits (__result_of_memfun): Use remove_reference
1107 instead of __remove_cvref_t and remove redundant is_same check.
1108 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1109
809f1d63 1110 * include/experimental/string_view (basic_string_view::pointer)
1111 (basic_string_view::reference): Fix to refer to non-const value_type.
1112 * include/bits/basic_string.h (basic_string): Use __sv_check and
1113 __sv_limit instead of basic_string_view::_M_check and
1114 basic_string_view::_M_limit.
1115 * include/std/string_view (__sv_check, __sv_limit): New
1116 helper functions to replace basic_string_view::_M_check and
1117 basic_string_view::_M_limit.
1118 (basic_string_view): Add static assertions to enforce ill-formed
1119 requirement for traits_type::char_type from P1148R0, and to enforce
1120 required properties of char-like types.
1121 (basic_string_view::pointer, basic_string_view::reference): Fix to
1122 refer to non-const value_type.
1123 (basic_string_view::operator[], basic_string_view::at)
1124 (basic_string_view::front, basic_string_view::back)
1125 (basic_string_view::data): Use const_reference and const_pointer
1126 typedefs for return types.
1127 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1128 (hash<wstring_view>): Fix argument_type typedef.
1129 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1130 char/1.cc: Fix expected return type of basic_string_view::data().
1131 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1132 wchar_t/1.cc: Likewise.
1133 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1134 char/1.cc: Likewise.
1135 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1136 wchar_t/1.cc: Likewise.
1137 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1138 New test.
1139 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1140 Check reference and pointer typedefs.
1141 * testsuite/experimental/string_view/requirements/typedefs.cc:
1142 Likewise.
1143 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1144 Fix expected return type of basic_string_view::data().
1145 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1146 1.cc: Likewise.
1147 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1148 Likewise.
1149 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
1150 1.cc: Likewise.
1151
37020b0a 1152 PR libstdc++/90220
1153 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
1154 Avoid a runtime check for types that can never be stored in std::any.
1155 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1156 array types.
1157
b8e73341 1158 PR libstdc++/90220 (partial)
1159 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
1160 not attempt ill-formed static_cast to pointers to non-object types.
1161 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1162 function types.
1163
1c9c8e0d 1164 * testsuite/20_util/variant/run.cc: Catch exception by reference to
1165 prevent -Wcatch-value warning.
1166
fd1863e1 1167 * include/std/variant (__variant_construct): Use template parameter
1168 type instead of equivalent decltype-specifier.
1169 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
1170 Replace forward with move.
1171 (_Move_ctor_base<false, Types...>::_M_destructive_move)
1172 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
1173 (_Move_ctor_base<true, Types...>::_M_destructive_move)
1174 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
1175 index after construction succeeds.
1176 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
1177 if-constexpr checks that are always true. Use __remove_cvref_t instead
1178 of remove_reference so that is_nothrow_move_constructible check
1179 doesn't use a const rvalue parameter. In the potentially-throwing case
1180 construct a temporary and move assign it, as per LWG 2904.
1181 (_Move_assign_base<false, Types...>::operator=): Remove redundant
1182 if-constexpr checks that are always true. Use emplace as per LWG 2904.
1183 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
1184 construct a temporary and move assign from it, as per LWG 2904.
1185 * testsuite/20_util/variant/exception_safety.cc: Check that
1186 assignment operators have strong exception safety guarantee.
1187
55bb4515 11882019-04-23 Thomas Rodgers <trodgers@redhat.com>
1189
1190 Document PSTL linker flags
1191
7f6a1a9c 1192 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
55bb4515 1193
b48cc8c5 11942019-04-23 Jonathan Wakely <jwakely@redhat.com>
1195
a4265b66 1196 * include/std/variant (__detail::__variant::_Traits): Make
1197 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
1198 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
1199 P0602R4.
1200 (__detail::__variant::_Copy_assign_alias): Only depend on
1201 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
1202 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
1203 move assignment operators.
1204
28cc38ec 1205 PR libstdc++/90165
1206 * include/std/variant (variant::__not_self): New helper for the
1207 is_same_v<remove_cvref_t<T>, variant>==false constraints.
1208 (variant::__to_type_impl): Remove.
1209 (variant::__to_type): Add default argument to check pack size, instead
1210 of using __to_type_impl.
1211 (variant::__accepted_type): Add default argument using __not_self.
1212 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
1213 for variant(T&&) constructor constraint.
1214 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
1215 Extract __accepted_type into a named template parameter for reuse in
1216 other constraints and in the exception specification.
1217 (variant::variant(in_place_type_t<T>, Args&&...))
1218 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
1219 (variant::variant(in_place_index_t<T>, Args&&...))
1220 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
1221 (variant::operator=T&&)): Remove redundant && from trait arguments.
1222 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
1223 isn't used for in_place_type or in_place_index arguments.
1224
b48cc8c5 1225 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
1226 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
1227 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
1228
9ac9ee83 12292019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1230 Bernd Edlinger <bernd.edlinger@hotmail.de>
1231 Jakub Jelinek <jakub@redhat.com>
1232
1233 PR target/89093
1234 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
1235 general-regs-only target attribute for ARM.
1236
e11f5aed 12372019-04-23 Jonathan Wakely <jwakely@redhat.com>
1238
b9d8292f 1239 PR libstdc++/87431
1240 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
1241 specialization also depend on is_nothrow_move_constructible.
1242 * include/std/variant (__detail::__variant::__never_valueless()):
1243 Only true if the variant would have a move assignment operator.
1244 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
1245 Check __never_valueless<T...>().
1246 (variant::emplace): Only perform non-throwing move assignments
1247 for never-valueless alternatives if the variant has a move assignment
1248 operator.
1249 * testsuite/20_util/variant/compile.cc: Check that never-valueless
1250 types can be emplaced into non-assignable variants.
1251 * testsuite/20_util/variant/run.cc: Check that never-valueless types
1252 don't get copied when emplaced into non-assignable variants.
1253
e11f5aed 1254 * include/std/variant (__detail::__variant::__ref_cast): Remove
1255 unused function.
1256 (__detail::__variant::_Uninitialized::_M_get)
1257 (__detail::__variant::__get)
1258 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
1259
46fbb8aa 12602019-04-21 Iain Sandoe <iain@sandoe.co.uk>
1261
1262 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
1263 to Darwin10.
1264 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1265 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1266 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1267 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1268
dff3f73c 12692019-04-20 Thomas Rodgers <trodgers@redhat.com>
1270
1271 Delegate PSTL configuration to pstl/pstl_config.h
1272
1273 * include/bits/c++config: Remove explicit PSTL configuration
1274 macros and use definitions from <pstl/pstl_config.h>.
1275
3dbad48e 12762019-04-20 Thomas Rodgers <trodgers@redhat.com>
1277
1278 Cleanup algorithm implementations
1279 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
ed42fdb5 1280 execution policy.
3dbad48e 1281 (mismatch): Forward execution policy.
1282 (equal): Qualify call to std::equal().
1283 (partial_sort): Forward execution policy.
1284 (inplace_merge): Forward execution policy.
1285
5d637ddd 12862019-04-19 Thomas Rodgers <trodgers@redhat.com>
1287
1288 Improve implementation of parallel equal()
1289 * include/pstl/algorithm_impl.h
1290 (__internal::__brick_equal): use "4 iterator" version of
1291 std::equal().
1292 (__internal::__brick_equal): use simd for random access
1293 iterators on unsequenced execution policies.
1294 (__internal::__pattern_equal): add "4 iterator" version
1295 (__internal::__pattern_equal): dispatch to simd __brick_equal
1296 for vector-only execution policies.
1297 (__internal::__pattern_equal): dispatch to __parallel_or for
1298 parallel execution policies.
1299 * include/pstl/glue_algorithm_impl.h
1300 (std::equal): dispatch to "4 iterator" version of
1301 __internal::__pattern_equal().
1302
88dbeb04 13032019-04-17 Jonathan Wakely <jwakely@redhat.com>
1304
a0295ab5 1305 PR libstdc++/90105
1306 * include/bits/forward_list.h (operator==): Do not use operator!= to
1307 compare elements.
1308 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1309 earlier in the list, so that sort is stable.
1310 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1311 * testsuite/23_containers/forward_list/comparable.cc: Test with
1312 types that meet the minimum EqualityComparable and LessThanComparable
1313 requirements. Remove irrelevant comment.
1314
37a7dbf9 1315 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1316 Do not depend on whether all alternative types are move constructible.
1317 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1318 from the operand when deciding whether to perform the assignment.
1319 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1320 with deleted move constructor and deleted move assignment operator.
1321 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1322 behaviour of variants with DeletedMoves as an alternative.
1323 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1324 (move_ctor, move_assign): Check that moving a variant with a
1325 DeletedMoves alternative falls back to copying instead of moving.
1326
e9a490a4 1327 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1328 from static_assert declarations.
1329
c4495ab1 1330 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1331 actually match its name.
1332 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1333 (test_swap()): Fix result for MoveCtorOnly and check
1334 MoveCtorAndSwapOnly.
1335
88dbeb04 1336 * include/std/optional (optional::value_or(U&&) &&): Add missing
1337 constexpr specifier.
1338 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1339 for disengaged optionals and rvalue optionals.
1340 * testsuite/20_util/optional/observers/4.cc: Likewise.
1341
11deac81 13422019-04-12 Thomas Rodgers <trodgers@redhat.com>
1343
1344 * include/pstl/algorithm_impl.h: Uglify identfiers.
1345 * include/pstl/numeric_impl.h: Uglify identfiers.
1346 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1347
34d8d757 13482019-04-11 Thomas Rodgers <trodgers@redhat.com>
1349
1350 * include/bits/c++config:
1351 Add definition for __PSTL_ASSERT.
1352 Add definition for __PSTL_ASSERT_MSG.
1353 * include/pstl/algorithm_impl.h: Replace use of assert().
1354 * include/pstl/numeric_impl.h: Replace use of assert().
1355 * include/pstl/parallel_backend_tbb.h:
1356 Replace use of assert().
1357 Replace use of __TBB_ASSERT().
34d8d757 1358 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1359
629a2d18 13602019-04-11 Jonathan Wakely <jwakely@redhat.com>
1361
1362 PR libstdc++/90046
1363 * src/c++17/memory_resource.cc
1364 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1365 needed to allow placing a _Chunk at the end of the buffer.
1366 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1367
b047c9ae 13682019-04-10 Jonathan Wakely <jwakely@redhat.com>
1369
6a98b075 1370 * doc/xml/faq.xml: Add information about emergency EH pool.
1371 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1372 Move outdated information on mt_allocator to a separate section.
1373 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1374 doesn't affect the default allocator.
1375
706bf2a5 1376 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1377 typo.
1378
b047c9ae 1379 PR libstdc++/89851
1380 * testsuite/20_util/variant/89851.cc: New test.
1381
faa382bd 13822019-04-09 Jonathan Wakely <jwakely@redhat.com>
1383
492debfa 1384 * include/std/variant: Adjust whitespace. Add comments.
1385 (_Multi_array): Leave primary template undefined.
1386 (_Multi_array<_Tp>): Define partial specialization for base case of
1387 recursion.
1388 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1389 which is always a reference.
1390 (__gen_vtable::_S_apply()): Remove function, inline body into
1391 default member initializer.
1392 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1393
47cf9c4c 1394 * include/std/variant (__variant_idx_cookie): Add member type.
1395 (__visitor_result_type): Remove.
1396 (__do_visit): Use invoke_result instead of __visitor_result_type.
1397 * testsuite/20_util/variant/visit.cc: New test.
1398
faa382bd 1399 PR libstdc++/90008
1400 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1401 unused capture.
1402 * testsuite/20_util/variant/90008.cc: New test.
1403
e4da4897 14042019-04-09 Thomas Rodgers <trodgers@redhat.com>
1405
1406 * include/pstl/algorithm_impl.h: Add namespace qualification.
1407 * include/pstl/execution_defs.h: Add namespace qualification.
1408 * include/pstl/execution_impl.h: Add namespace qualification.
1409 * include/pstl/numeric_impl.h: Add namespace qualification.
1410 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1411 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1412 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1413
ff7d433d 14142019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1415
1416 Fix visit<R> for variant.
1417 * include/std/variant (__do_visit): Add a template parameter
1418 for enforcing same return types for visit.
1419 (__gen_vtable_impl): Likewise.
1420 (_S_apply_single_alt): Adjust.
1421 (__visit_invoke_impl): New. Handle casting to void.
1422 (__do_visit_invoke): New. Enforces same return types.
1423 (__do_visit_invoke_r): New. Converts return types.
1424 (__visit_invoke): Adjust.
1425 (__gen_vtable): Add a template parameter for enforcing
1426 same return types for visit.
1427 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1428 different return types.
1429 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1430 visitors with different return types don't accidentally
1431 compile with regular visitation.
1432
d0f56531 14332019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1434
1435 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1436 dg-require-filesystem-ts.
1437
781cb64d 14382019-04-05 Jonathan Wakely <jwakely@redhat.com>
1439
bfbd20f7 1440 * doc/xml/manual/status_cxx2020.xml: Update status.
1441 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1442 * testsuite/20_util/variant/visit_r.cc: New test.
1443
83bd31bf 1444 * include/bits/fs_dir.h (directory_iterator::operator*)
1445 (directory_iterator::operator->): Add noexcept.
1446 (operator==, operator!=): Replace namespace-scope equality operators
1447 for directory iterators with hidden friends.
1448
0067a809 1449 PR libstdc++/89986
1450 * config/abi/pre/gnu.ver: Add missing exports.
1451 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1452 increment member.
1453
7d0ae205 1454 * config/abi/pre/gnu.ver: Export new symbols.
1455 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1456 (recursive_directory_iterator::recursion_pending())
1457 (recursive_directory_iterator::disable_recursion_pending()): Remove
1458 inline definitions. Make noexcept.
1459 (recursive_directory_iterator::depth())
1460 (recursive_directory_iterator::operator*())
1461 (recursive_directory_iterator::operator->()): Make noexcept.
1462 (recursive_directory_iterator::_M_options)
1463 (recursive_directory_iterator::_M_pending): Remove data members.
1464 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1465 (recursive_directory_iterator::recursive_directory_iterator): Remove
1466 ctor-initializer. Use new constructor for _Dir_stack.
1467 (recursive_directory_iterator::options())
1468 (recursive_directory_iterator::recursion_pending())
1469 (recursive_directory_iterator::disable_recursion_pending()): Add
1470 non-inline definitions.
1471 (recursive_directory_iterator::depth()): Make noexcept.
1472 (recursive_directory_iterator::increment(error_code&))
1473 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1474 location of options and recursion_pending members.
1475 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1476 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1477 user-declared move constructor and assignment operator, to make the
1478 type move-only.
1479
5a6e0b73 1480 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1481 d_type == DT_UNKNOWN immediately.
1482 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1483 handling here.
1484 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1485
aa9c570e 1486 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1487 assignment.
1488 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1489 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1490 assignment.
1491
781cb64d 1492 PR libstdc++/87431 (again)
1493 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1494 Define partial specialization for basic_string.
1495 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1496 shared_ptr and weak_ptr.
1497 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1498 function.
1499 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1500 vector.
1501 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1502 unique_ptr.
1503 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1504 vector.
1505 * include/std/any (_Never_valueless_alt): Define explicit
1506 specialization for any.
1507 * include/std/variant (_Never_valueless_alt): Define primary template.
1508 (__never_valueless): Use _Never_valueless_alt instead of
1509 is_trivially_copyable.
1510 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1511 initializations to avoid try-catch overhead. Add special case for
1512 scalars produced by potentially-throwing conversions. Use
1513 _Never_valueless_alt instead of is_trivially_copyable for the
1514 remaining strong exception-safety cases.
1515 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1516 * testsuite/20_util/variant/87431.cc: Run both test functions.
1517 * testsuite/20_util/variant/exception_safety.cc: New test.
1518 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1519 so the variant becomes valueless.
1520
62fd39e8 15212019-04-03 Jonathan Wakely <jwakely@redhat.com>
1522
e1d699b8 1523 PR libstdc++/85184
1524 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1525 Remove assertions.
72be2bb7 1526 (variant::emplace<_Tp>): Return result of emplace<N> directly.
e1d699b8 1527
62fd39e8 1528 * include/std/string (__hash_string_base): New class template defining
1529 operator() for hashing strings.
1530 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1531 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1532 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1533 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1534
4f3e024d 15352019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1536
1537 Use single-visitation in variant assignment and swap and relops.
1538 Also use indices instead of types when checking whether
1539 variants hold the same thing.
1540 * include/std/variant (__do_visit): Add a template parameter
1541 for index visitation, invoke with indices if index visitation
1542 is used.
1543 (__variant_idx_cookie): New.
1544 (__visit_with_index): Likewise.
1545 (_Copy_assign_base::operator=): Do single-visitation with
1546 an index visitor.
1547 (_Move_assign_base::operator=): Likewise.
1548 (_Extra_visit_slot_needed): Adjust.
1549 (__visit_invoke): Call with indices if it's an index visitor.
1550 (relops): Do single-visitation with an index visitor.
1551 (swap): Likewise.
1552 (__visitor_result_type): New.
1553
106979b7 15542019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1555
1556 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1557
225ca87b 15582019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1559
1560 Don't revisit a variant we are already visiting.
1561 * include/std/variant (__variant_construct_single): New.
1562 (__variant_construct): Use it.
1563 (_M_destructive_move): Likewise.
1564 (_M_destructive_copy): Likewise.
1565 (_Copy_assign_base::operator=): Adjust.
1566 (_Move_assign_base::operator=): Likewise.
1567 (swap): Likewise.
1568
7237dce7 15692019-03-26 Jonathan Wakely <jwakely@redhat.com>
1570
1571 PR libstdc++/85965
1572 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1573 destructor so they are not evaluated until the _Key type is complete.
1574 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1575 * testsuite/23_containers/set/85965.cc: New test.
1576 * testsuite/23_containers/unordered_set/85965.cc: New test.
1577 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1578 with regexp matching the corresponding _Rb_tree specialization.
1579 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1580 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1581 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1582 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1583 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1584 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1585 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1586
4c0ef551 15872019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1588
1589 PR libstdc++/89825
1590 Fix based on a suggestion by Antony Polukhin.
1591 * include/std/variant (__never_valueless): New.
1592 (_M_valid): Use it.
1593 (_Extra_visit_slot_needed): New.
1594 (_Multi_array): Use it.
1595 (_S_apply_all_alts): Likewise.
1596
28b460dd 15972019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1598
1599 PR libstdc++/89824
1600 Fix based on a suggestion by Antony Polukhin.
1601 * include/std/variant (__gen_vtable): Don't reserve an
1602 additional table slot, _Multi_array already does that.
1603
4d235dc5 16042019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1605
1606 PR libstdc++/89816
1607 Fix based on a suggestion by Antony Polukhin.
1608 * include/std/variant (__variant_construct): Capture a pointer
1609 to the storage and visit just one variant.
1610
d0595c7e 16112019-03-22 Jonathan Wakely <jwakely@redhat.com>
1612
5c34f7ca 1613 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1614 Doxygen-generated pages with unstable URL.
1615 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1616 * doc/xml/manual/extensions.xml: Likewise.
1617 * doc/xml/manual/parallel_mode.xml: Likewise.
1618 * doc/xml/manual/support.xml: Likewise.
1619
d0595c7e 1620 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1621 avoid -Wconversion warnings.
1622
7e155e54 16232019-03-21 Thomas Rodgers <trodgers@redhat.com>
1624
1625 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1626 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
1627 (allstamped): Add stamp-pstl.
1628 (install-headers): Add ptsl_builddir.
1629 * include/Makefile.in: Regenerate.
1630 * include/bits/c++config: Add pstl configuration.
1631 * include/pstl/LICENSE.txt: New file.
1632 * include/pstl/algorithm_fwd.h: New file.
1633 * include/pstl/algorithm_impl.h: New file.
1634 * include/pstl/execution_defs.h: New file.
1635 * include/pstl/execution_impl.h: New file.
1636 * include/pstl/glue_algorithm_defs.h: New file.
1637 * include/pstl/glue_algorithm_impl.h: New file.
1638 * include/pstl/glue_execution_defs.h: New file.
1639 * include/pstl/glue_memory_defs.h: New file.
1640 * include/pstl/glue_memory_impl.h: New file.
1641 * include/pstl/glue_numeric_defs.h: New file.
1642 * include/pstl/glue_numeric_impl.h: New file.
1643 * include/pstl/memory_impl.h: New file.
1644 * include/pstl/numeric_fwd.h: New file.
1645 * include/pstl/numeric_impl.h: New file.
1646 * include/pstl/parallel_backend.h: New file.
1647 * include/pstl/parallel_backend_tbb.h: New file.
1648 * include/pstl/parallel_backend_utils.h: New file.
1649 * include/pstl/parallel_impl.h: New file.
1650 * include/pstl/pstl_config.h: New file.
1651 * include/pstl/unseq_backend_simd.h: New file.
1652 * include/pstl/utils.h: New file.
1653 * include/std/algorithm: Include parallel algorithm implementations.
1654 * include/std/execution: New file.
1655 * include/std/memory: Include parallel algorithm implementations.
1656 * include/std/numeric: Include parallel algorithm implementations.
1657 * include/std/version: Add parallel algorithms feature test macro.
1658 * testsuite/util/pstl/pstl_test_config.h: New file.
1659 * testsuite/util/pstl/test_utils.h: New file.
1660 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1661 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1662 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1663 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1664 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1665 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1666 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1667 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1668 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1669 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1670 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1671 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1672 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1673 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1674 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1675 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1676 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1677 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1678 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1679 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1680 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1681 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1682 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1683 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1684 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1685 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1686 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1687 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1688 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1689 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1690 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1691 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1692 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1693 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1694 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1695 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1696 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1697 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1698 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1699 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1700 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1701 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1702 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1703 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1704 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1705 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1706 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1707 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1708 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1709 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1710 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1711 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1712 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1713 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1714 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1715 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1716 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1717 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1718 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1719 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1720 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1721 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1722 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1723 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1724 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1725 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1726 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1727 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1728 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1729 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1730 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1731 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1732 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1733 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1734 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1735 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1736 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1737 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1738 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1739 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1740 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1741 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1742 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1743 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1744 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1745 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1746 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1747 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1748 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1749 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1750 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1751 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1752 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1753 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1754 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1755 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1756 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1757 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1758 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1759 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1760 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1761 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1762 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1763 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1764 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1765 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1766
480b3b75 17672019-03-21 Jonathan Wakely <jwakely@redhat.com>
1768
0a4390ac 1769 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
1770 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
1771 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
1772 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
1773 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
1774 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
1775 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
1776 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
1777 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
1778 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
1779 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
1780 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
1781 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
1782 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
1783 when the special functions IS is enabled, not for C++17.
1784 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
1785 Replace with ...
1786 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
1787 without checks for special functions in C++17.
1788 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
1789 New test.
1790
480b3b75 1791 PR libstdc++/88066
1792 * include/backward/hash_map: Use <> for includes not "".
1793 * include/backward/hash_set: Likewise.
1794 * include/backward/strstream: Likewise.
1795 * include/tr1/bessel_function.tcc: Likewise.
1796 * include/tr1/exp_integral.tcc: Likewise.
1797 * include/tr1/legendre_function.tcc: Likewise.
1798 * include/tr1/modified_bessel_func.tcc: Likewise.
1799 * include/tr1/riemann_zeta.tcc: Likewise.
1800
ed360d55 18012019-03-19 Jonathan Wakely <jwakely@redhat.com>
1802
1803 * doc/xml/manual/allocator.xml: Link to table documenting evolution
1804 of extension allocators.
1805 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
1806 Document new headers in 7.2, 8.1 and 9.1 releases.
1807 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
1808 * doc/html/*: Regenerate.
1809
8f9d7eb1 18102019-03-12 John David Anglin <dave.anglin@bell.net>
1811
1812 PR libstdc++/89461
1813 * testsuite/lib/libstdc++.exp: Locate libatomic.
1814 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
1815 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
1816 libatomic options.
1817 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1818 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
1819 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
1820 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1821
0bd005b6 18222019-03-11 Jonathan Wakely <jwakely@redhat.com>
1823
5995ba3a 1824 PR libstdc++/89460
1825 * configure.ac: Check for sockatmark.
1826 * crossconfig.m4: Check for sockatmark.
1827 * config.h.in: Regenerate.
1828 * configure: Regenerate.
1829 * include/experimental/internet (address_v4::_S_hton): Rename
1830 overloaded functions to _S_hton_16 and _S_ntoh_16.
1831 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
1832 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
1833 * include/experimental/socket (basic_socket::at_mark): Check
1834 _GLIBCXX_HAVE_SOCKATMARK.
1835
5aa8571a 1836 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
1837 const variables instead of macros.
1838
0bd005b6 1839 PR libstdc++/89629
1840 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
1841 Use correct type for len_aligned.
1842 * testsuite/20_util/hash/89629.cc: New test.
1843
bc204227 18442019-03-11 Jakub Jelinek <jakub@redhat.com>
1845
1846 PR libstdc++/89641
1847 * include/std/atomic (atomic<T>::store, atomic<T>::load,
1848 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
1849 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
1850 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
1851 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
1852 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
1853 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
1854 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
1855 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
1856 memory_order_seq_cst to int.
1857
fc557c2b 18582019-03-08 Jonathan Wakely <jwakely@redhat.com>
1859
59b5e890 1860 * doc/xml/manual/using.xml: Use link element instead of xref.
1861 * doc/html/*: Regenerate.
1862
fc557c2b 1863 * include/bits/fs_path.h (path::format): Add fixed underlying type.
1864
66c6ff9e 18652019-03-08 François Dumont <fdumont@gcc.gnu.org>
1866
448338d0 1867 PR libstdc++/89477
1868 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
1869 parameters in deduction guides.
1870 * include/debug/multimap.h (multimap): Likewise.
1871 * include/debug/set.h (multimap): Likewise.
1872 * include/debug/multiset.h (multimap): Likewise.
1873 * include/debug/unordered_map (unordered_map): Likewise.
1874 (unordered_multimap): Likewise.
1875 * include/debug/unordered_set (unordered_set): Likewise.
1876 (unordered_multiset): Likewise.
1877
66c6ff9e 1878 PR libstdc++/89608
1879 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
1880 Invalidate all iterators in case of rehash.
1881 (unordered_multimap<>::_M_check_rehashed): Likewise.
1882 * include/debug/unordered_set
1883 (unordered_set<>::_M_check_rehashed): Likewise.
1884 (unordered_multiset<>::_M_check_rehashed): Likewise.
1885 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
1886
32e92dc2 18872019-03-07 Andreas Schwab <schwab@suse.de>
1888
1889 * config/abi/post/riscv64-linux-gnu: New directory.
1890 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
1891
61dcf2e1 18922019-03-07 Jonathan Wakely <jwakely@redhat.com>
1893
682ee94e 1894 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
1895 compile test to run. Fix typo.
1896
f24442bd 1897 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1898 * doc/html/*: Regenerate.
1899
61dcf2e1 1900 P0356R5 Simplified partial function application
1901 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
1902 helpers for bind_front.
1903 (bind_front, __cpp_lib_bind_front): Define.
1904 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
1905
b4af2395 19062019-03-06 Jonathan Wakely <jwakely@redhat.com>
1907
1908 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
1909 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
1910 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
1911 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1912
f1857b8b 19132019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1914
1915 PR libstdc++/86655 - std::assoc_legendre should not constrain
1916 the value of m (or x).
1917 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
1918 __sph_legendre): If degree > order Don't throw, return 0.
1919 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
1920 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
1921 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
1922 * testsuite/tr1/5_numerical_facilities/special_functions/
1923 02_assoc_legendre/pr86655.cc: New test.
1924 * testsuite/tr1/5_numerical_facilities/special_functions/
1925 22_sph_legendre/pr86655.cc: New test.
1926
49c83dca 19272019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1928
1929 Rewrite variant.
1930 Also PR libstdc++/85517
1931 * include/std/variant (__do_visit): New.
1932 (__variant_cast): Likewise.
1933 (__variant_cookie): Likewise.
1934 (__erased_*): Remove.
1935 (_Variant_storage::_S_vtable): Likewise.
1936 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
1937 (_Variant_storage::__M_reset): Adjust.
1938 (__variant_construct): New.
1939 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
1940 __variant_construct.
1941 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1942 (_Move_ctor_base::__M_destructive_copy): New.
1943 (_Move_ctor_base::__M_destructive_move): Adjust to use
1944 __variant_construct.
1945 (_Copy_assign_base::operator=): Adjust to use __do_visit.
1946 (_Copy_assign_alias): Adjust to check both copy assignment
1947 and copy construction for triviality.
1948 (_Move_assign_base::operator=): Adjust to use __do_visit.
1949 (_Multi_array): Add support for visitors that accept and return
1950 a __variant_cookie.
1951 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
1952 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
1953 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
1954 a __variant_cookie temporary for a variant that is valueless and..
1955 (__gen_vtable_impl::__visit_invoke): ..adjust here.
1956 (__gen_vtable::_Array_type): Conditionally make space for
1957 the __variant_cookie visitor case.
1958 (__variant_construct_by_index): New.
1959 (get_if): Adjust to use std::addressof.
1960 (relops): Adjust to use __do_visit.
1961 (variant): Add __variant_cast and __variant_construct_by_index
1962 as friends.
1963 (variant::emplace): Use _M_reset() and __variant_construct_by_index
1964 instead of self-destruction.
1965 (variant::swap): Adjust to use __do_visit.
1966 (visit): Reimplement in terms of __do_visit.
1967 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
1968 * testsuite/20_util/variant/compile.cc: Adjust.
1969 * testsuite/20_util/variant/run.cc: Likewise.
1970
13825fb2 19712019-03-06 Jonathan Wakely <jwakely@redhat.com>
1972
2613fa6b 1973 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
1974 constant.
1975 * testsuite/experimental/feat-char8_t.cc: Likewise.
1976
a17f06b3 1977 * include/std/type_traits [C++20] (is_bounded_array)
1978 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
1979 Define.
1980 * testsuite/20_util/is_bounded_array/requirements/
1981 explicit_instantiation.cc: New test.
1982 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
1983 test.
1984 * testsuite/20_util/is_bounded_array/value.cc: New test.
1985 * testsuite/20_util/is_unbounded_array/requirements/
1986 explicit_instantiation.cc: New test.
1987 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
1988 * test.
1989 * testsuite/20_util/is_unbounded_array/value.cc: New test.
1990
13825fb2 1991 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
1992 Add constexpr.
1993 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
1994
2e73e63a 19952019-03-05 Jonathan Wakely <jwakely@redhat.com>
1996
1997 * include/c_compatibility/math.h [C++20] (lerp): Add using
1998 declaration.
1999 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2000 (__lerp): Define function template to implement lerp.
2001 (lerp(float, float, float), lerp(double, double, double))
2002 (lerp(long double, long double, long double)): Define for C++20.
2003 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2004 (midpoint(T, T), midpoint(T*, T*)): Define.
2005 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2006 * testsuite/26_numerics/lerp.cc: New test.
2007 * testsuite/26_numerics/midpoint/floating.cc: New test.
2008 * testsuite/26_numerics/midpoint/integral.cc: New test.
2009 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2010
08d3ce5b 20112019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2012
2013 PR libstdc++/88996 Implement P0439R0
2014 Make std::memory_order a scoped enumeration.
2015 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2016 add variables for the old enumerators. Adjust calls.
2017 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2018 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2019
ad29ad75 20202019-03-04 Jonathan Wakely <jwakely@redhat.com>
2021
4233f2a8 2022 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2023 directive.
2024
ad29ad75 2025 * include/std/memory_resource (polymorphic_allocator): Add default
2026 template argument for C++20.
2027 (polymorphic_allocator::allocate_bytes)
2028 (polymorphic_allocator::deallocate_bytes)
2029 (polymorphic_allocator::allocate_object)
2030 (polymorphic_allocator::deallocate_object)
2031 (polymorphic_allocator::new_object)
2032 (polymorphic_allocator::delete_object): New member functions for
2033 C++20.
2034 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2035 test.
2036
d4c27c4a 20372019-03-03 Jonathan Wakely <jwakely@redhat.com>
2038
2039 PR libstdc++/89562
2040 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2041 mode for mingw.
2042
6a9c77f1 20432019-03-01 Jonathan Wakely <jwakely@redhat.com>
2044
5b313df9 2045 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2046 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2047
6a9c77f1 2048 * include/std/memory (uses_allocator_construction_args): New set of
2049 overloaded functions.
2050 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2051 New functions.
2052 * include/std/memory_resource (polymorphic_allocator::construct)
2053 [__cplusplus > 201703l]: Replace all overloads with a single function
2054 using uses_allocator_construction_args.
2055 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2056 test.
2057 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2058
53ea0887 20592019-02-27 Jonathan Wakely <jwakely@redhat.com>
2060
2061 PR libstdc++/89466
2062 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2063 stylesheet directories before check for xsltproc. Try to use
2064 xmlcatalog to find local stylesheet directory before trying hardcoded
2065 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2066 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2067 use xsltproc if xmlcatalog fails to find a local stylesheet.
2068 * configure.ac: Check for xmlcatalog.
2069 * Makefile.in: Regenerate.
2070 * configure: Likewise.
2071 * doc/Makefile.in: Likewise.
2072 * include/Makefile.in: Likewise.
2073 * libsupc++/Makefile.in: Likewise.
2074 * po/Makefile.in: Likewise.
2075 * python/Makefile.in: Likewise.
2076 * src/Makefile.in: Likewise.
2077 * src/c++11/Makefile.in: Likewise.
2078 * src/c++17/Makefile.in: Likewise.
2079 * src/c++98/Makefile.in: Likewise.
2080 * src/filesystem/Makefile.in: Likewise.
2081 * testsuite/Makefile.in: Likewise.
2082
72ebb7e8 20832019-02-26 Jonathan Wakely <jwakely@redhat.com>
2084
a7f2f1b1 2085 PR libstdc++/89477
2086 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2087 container deduction guides.
2088 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2089 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2090 parameters in deduction guides.
2091 * include/bits/stl_multimap.h (multimap): Likewise.
2092 * include/bits/stl_multiset.h (multiset): Likewise.
2093 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2094 * include/bits/stl_set.h (set): Likewise.
2095 * include/bits/stl_stack.h (stack): Likewise.
2096 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2097 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2098 constrain parameters in deduction guides.
2099 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2100 Likewise.
2101 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2102 deduction cases.
2103 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2104 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2105 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2106 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2107 Likewise.
2108 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2109 Likewise.
2110 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2111
72ebb7e8 2112 PR libstdc++/89416
2113 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2114 to class template and partial specialization using void_t.
2115 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2116
c9f61a64 21172019-02-24 Jonathan Wakely <jwakely@redhat.com>
2118
2119 PR libstdc++/89416
2120 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2121 copy and move members public.
2122
61e2d6f7 21232019-02-23 Jonathan Wakely <jwakely@redhat.com>
2124
87798f3f 2125 * include/std/type_traits (__underlying_type_impl): New helper to
2126 make underlying_type SFINAE-friendly.
2127 (underlying_type): Derive from __underlying_type_impl.
2128 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2129 test.
2130
61e2d6f7 2131 PR libstdc++/89446
2132 * include/bits/char_traits.h (__constant_char_array): Check index is
2133 in range before dereferencing.
2134 (char_traits<char>::compare, char_traits<char>::find)
2135 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2136 immediately if n is zero.
2137 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2138 Remove workarounds for PR 67026.
2139 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2140 New test.
2141 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2142 New test.
2143
90a443b3 21442019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2145
2146 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2147 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2148
98485ce3 21492019-02-22 Jakub Jelinek <jakub@redhat.com>
2150
2151 PR libstdc++/89402
2152 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
2153 type to std::size_t and argument to type to long double.
2154
26b4fc38 21552019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2156
2157 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
2158 * config/abi/post/sparc64-linux-gnu: New directory.
2159 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
2160 * config/abi/post/sparc64-linux-gnu/32: New directory.
2161 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
2162
4f847a8e 21632019-02-21 Jonathan Wakely <jwakely@redhat.com>
2164
2165 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
2166 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
2167 test.
2168
aad651b3 21692019-02-22 Tom Honermann <tom@honermann.net>
2170
2171 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
2172 printers for u8string and u8string_view.
2173
c783b3cc 21742019-02-22 Tom Honermann <tom@honermann.net>
2175
2176 * testsuite/18_support/byte/ops.cc: Validate
2177 std::to_integer<char8_t>, std::to_integer<char16_t>, and
2178 std::to_integer<char32_t>.
2179 * testsuite/18_support/numeric_limits/dr559.cc: Validate
2180 std::numeric_limits<char8_t>.
2181 * testsuite/18_support/numeric_limits/lowest.cc: Validate
2182 std::numeric_limits<char8_t>::lowest().
2183 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
2184 std::numeric_limits<char8_t>::max_digits10.
2185 * testsuite/18_support/type_info/fundamental.cc: Validate
2186 typeinfo for char8_t.
2187 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
2188 std::from_chars with char8_t.
2189 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
2190 Validate explicit instantiation of std::hash<char8_t>.
2191 * testsuite/20_util/is_integral/value.cc: Validate
2192 std::is_integral<char8_t>.
2193 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
2194 Validate std::make_signed<char8_t>.
2195 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2196 Validate u8string construction from char8_t sources.
2197 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
2198 std::pmr::u8string.
2199 * testsuite/21_strings/basic_string_view/operations/compare/
2200 char/70483.cc: Validate substr operations on u8string_view.
2201 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
2202 the u8string_view typedef is defined.
2203 * testsuite/21_strings/char_traits/requirements/
2204 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
2205 member functions.
2206 * testsuite/21_strings/char_traits/requirements/
2207 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
2208 constexpr member functions.
2209 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
2210 that the u8string typedef is defined.
2211 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
2212 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
2213 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
2214 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
2215 numbers.
2216 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2217 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
2218 Likewise.
2219 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2220 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2221 Validate std::atomic<char8_t>::is_always_lock_free
2222 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
2223 Update line numbers.
2224 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
2225 Likewise.
2226 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
2227 Likewise.
2228 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2229 Validate std::experimental::pmr::u8string.
2230 * testsuite/experimental/string_view/typedefs.cc: Validate that the
2231 u8string_view typedef is defined.
2232 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
2233 char32_t to the typelists.
2234
ef96a935 22352019-02-22 Tom Honermann <tom@honermann.net>
2236
2237 * include/ext/typelist.h: Constrain a partial specialization of
2238 typelist::detail::append_ to only match chain<T1,T2>.
2239
d373b606 22402019-02-21 Jonathan Wakely <jwakely@redhat.com>
2241
2242 PR libstdc++/89416
2243 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
2244 class template with class. Replace move and copy member types with
2245 member alias templates, so they are only instantiated when needed.
2246 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2247 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
2248 test for C++11/14/17 as well.
2249 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
2250 test.
2251
25395ee8 22522019-02-20 Jakub Jelinek <jakub@redhat.com>
2253
2254 PR libstdc++/89402
2255 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
2256 _GLIBCXX_PURE to the alias declaration.
2257
affcb65b 22582019-02-19 Jonathan Wakely <jwakely@redhat.com>
2259
2260 * testsuite/21_strings/basic_string/literals/types.cc
2261 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
2262 * testsuite/21_strings/basic_string/literals/values.cc
2263 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2264 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
2265 potentially having different type.
2266 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2267 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
2268 to char.
2269 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
2270 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2271 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
2272 string literals only using basic character set.
2273 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
2274 u8 literals to char.
2275 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
2276 Test ATOMIC_CHAR8_T_LOCK_FREE.
2277 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
2278 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
2279 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
2280 * testsuite/experimental/string_view/literals/types.cc
2281 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
2282 literal.
2283 * testsuite/experimental/string_view/literals/values.cc
2284 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2285
4acc5060 22862019-02-19 Tom Honermann <tom@honermann.net>
2287
2288 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
2289 from char16_32_t.cc; validates numeric_limits<char8_t>.
2290 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
2291 test cloned from types.cc; validates operator""s for char8_t
2292 returns u8string.
2293 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
2294 test cloned from values.cc; validates construction and comparison
2295 of u8string values.
2296 * testsuite/21_strings/basic_string/requirements/
2297 /explicit_instantiation/char8_t/1.cc: New test cloned from
2298 char16_t/1.cc; validates explicit instantiation of
2299 basic_string<char8_t>.
2300 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2301 New test cloned from types.cc; validates operator""sv for char8_t
2302 returns u8string_view.
2303 * testsuite/21_strings/basic_string_view/literals/
2304 values-char8_t.cc: New test cloned from values.cc; validates
2305 construction and comparison of u8string_view values.
2306 * testsuite/21_strings/basic_string_view/requirements/
2307 explicit_instantiation/char8_t/1.cc: New test cloned from
2308 char16_t/1.cc; validates explicit instantiation of
2309 basic_string_view<char8_t>.
2310 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2311 New test cloned from char16_t/65049.cc; validates that
2312 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2313 * testsuite/21_strings/char_traits/requirements/char8_t/
2314 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2315 that char_traits<char8_t> member typedefs are present and correct.
2316 * testsuite/21_strings/char_traits/requirements/
2317 explicit_instantiation/char8_t/1.cc: New test cloned from
2318 char16_t/1.cc; validates explicit instantiation of
2319 char_traits<char8_t>.
2320 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2321 from char16_t.cc: validates
2322 codecvt<char16_t, char8_t, mbstate_t>.
2323 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2324 from char32_t.cc: validates
2325 codecvt<char32_t, char8_t, mbstate_t>.
2326 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2327 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2328 codecvt<char32_t, char8_t, std::mbstate_t>.
2329 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2330 test cloned from string.cc; validates filesystem::path construction
2331 from char8_t input.
2332 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2333 the __cpp_lib_char8_t feature test macro is defined with the
2334 correct value.
2335 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2336 New test cloned from string.cc; validates filesystem::path
2337 construction from char8_t input.
2338 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2339 test cloned from types.cc; validates operator""sv for char8_t
2340 returns u8string_view.
2341 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2342 New test cloned from values.cc; validates construction and
2343 comparison of u8string_view values.
2344 * testsuite/experimental/string_view/requirements/
2345 explicit_instantiation/char8_t/1.cc: New test cloned from
2346 char16_t/1.cc; validates explicit instantiation of
2347 basic_string_view<char8_t>.
2348 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2349 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2350 enabled.
2351
25694c85 23522019-02-19 Tom Honermann <tom@honermann.net>
2353
2354 P0482R5 char8_t: Standard library support
2355 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2356 typeinfo symbols for char8_t.
2357 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2358 (GLIBCXX_3.4.26): Add symbols for specializations of
2359 numeric_limits and codecvt that involve char8_t.
2360 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2361 * include/bits/atomic_base.h: Add atomic_char8_t.
2362 * include/bits/basic_string.h: Add std::hash<u8string> and
2363 operator""s(const char8_t*, size_t).
2364 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2365 __cpp_lib_char8_t.
2366 * include/bits/char_traits.h: Add char_traits<char8_t>.
2367 * include/bits/codecvt.h: Add
2368 codecvt<char16_t, char8_t, mbstate_t>,
2369 codecvt<char32_t, char8_t, mbstate_t>,
2370 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2371 codecvt_byname<char32_t, char8_t, mbstate_t>.
2372 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2373 recognize char8_t as an integral type.
2374 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2375 char8_t.
2376 (path::u8string): Return std::u8string when char8_t support is
2377 enabled.
2378 (path::generic_u8string): Likewise.
2379 (path::_S_convert): Handle conversion from char8_t input.
2380 (path::_S_str_convert): Likewise.
2381 * include/bits/functional_hash.h: Add hash<char8_t>.
2382 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2383 char8_t.
2384 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2385 for new char8_t specializations.
2386 * include/bits/localefwd.h: Add missing declarations of
2387 codecvt<char16_t, char, mbstate_t> and
2388 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2389 codecvt<char16_t, char8_t, mbstate_t> and
2390 codecvt<char32_t, char8_t, mbstate_t>.
2391 * include/bits/postypes.h: Add u8streampos
2392 * include/bits/stringfwd.h: Add declarations of
2393 char_traits<char8_t> and u8string.
2394 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2395 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2396 Recognize char8_t.
2397 (path::u8string): Return std::u8string when char8_t support is
2398 enabled.
2399 (path::generic_u8string): Likewise.
2400 (path::_S_convert): Handle conversion from char8_t input.
2401 (path::_S_str_convert): Likewise.
2402 * include/experimental/string: Add u8string.
2403 * include/experimental/string_view: Add u8string_view,
2404 hash<experimental::u8string_view>, and
2405 operator""sv(const char8_t*, size_t).
2406 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2407 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2408 as a character type.
2409 * include/std/limits: Add numeric_limits<char8_t>.
2410 * include/std/string_view: Add u8string_view,
2411 hash<experimental::u8string_view>, and
2412 operator""sv(const char8_t*, size_t).
2413 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2414 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2415 * libsupc++/atomic_lockfree_defines.h: Define
2416 ATOMIC_CHAR8_T_LOCK_FREE.
2417 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2418 codecvt.cc and limits.cc so that char8_t specializations of
2419 numeric_limits and codecvt and emitted.
2420 * src/c++11/Makefile.in: Likewise.
2421 * src/c++11/codecvt.cc: Define members of
2422 codecvt<char16_t, char8_t, mbstate_t>,
2423 codecvt<char32_t, char8_t, mbstate_t>,
2424 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2425 codecvt_byname<char32_t, char8_t, mbstate_t>.
2426 * src/c++11/limits.cc: Define members of
2427 numeric_limits<char8_t>.
2428 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2429 locale_init.cc and localename.cc.
2430 * src/c++98/Makefile.in: Likewise.
2431 * src/c++98/locale_init.cc: Add initialization for the
2432 codecvt<char16_t, char8_t, mbstate_t> and
2433 codecvt<char32_t, char8_t, mbstate_t> facets.
2434 * src/c++98/localename.cc: Likewise.
2435 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2436
140615bb 24372019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2438
2439 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2440 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2441 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2442
c677a9d7 24432019-02-14 Jonathan Wakely <jwakely@redhat.com>
2444
1bbfe9f8 2445 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2446 * doc/html/*: Regenerate.
2447
b24f00b1 2448 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2449 * doc/html/*: Regenerate.
2450
a3d1baa9 2451 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2452 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2453 allocator type in is_constructible checks.
2454 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2455 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2456 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2457 problematic type from LWG 2586 discussion.
2458 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2459 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2460
99d130bf 2461 * configure.ac: Check for C11 timespec_get function.
2462 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2463 (openbsd): Likewise
2464 * config.h.in: Regenerate.
2465 * configure: Regenerate.
2466 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2467 std for C++17 and up.
2468
48772ec3 2469 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2470 * include/bits/stl_queue.h
2471 (priority_queue(const Compare&, const Container&, const Alloc&))
2472 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2473 make_heap.
2474 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2475
ee32dd64 2476 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2477 * include/bits/stl_queue.h (queue, priority_queue): Add static
2478 assertions to enforce LWG 2566 requirement on value_type.
2479 * include/bits/stl_stack.h (stack): Likewise.
2480
9724de38 2481 PR middle-end/89303
2482 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2483
c677a9d7 2484 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2485 * include/bits/std_abs.h: Add comment about LWG 2735.
2486 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2487
4194f872 24882019-02-13 Jonathan Wakely <jwakely@redhat.com>
2489
2490 PR libstdc++/89345
2491 * include/std/version [__cpp_impl_destroying_delete]
2492 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2493 * libsupc++/new [__cpp_impl_destroying_delete]
2494 (__cpp_lib_destroying_delete): Likewise.
2495 (destroying_delete_t, destroying_delete): Likewise, but define even
2496 when __cpp_impl_destroying_delete is not defined.
2497 * testsuite/18_support/destroying_delete.cc: New test.
2498
aaacaee2 24992019-02-11 Jonathan Wakely <jwakely@redhat.com>
2500
2501 PR libstdc++/89023
2502 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2503 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2504 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2505 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2506
5256b0dd 25072019-02-09 Jonathan Wakely <jwakely@redhat.com>
2508
2509 PR libstdc++/71044
2510 * include/bits/fs_path.h (path::has_root_name)
2511 (path::has_root_directory, path::has_root_path)
2512 (path::has_relative_path, path::has_parent_path)
2513 (path::has_filename, path::has_stem, path::has_extension)
2514 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2515 noexcept.
2516 * src/c++17/fs_path.cc (path::has_root_name)
2517 (path::has_root_directory, path::has_root_path)
2518 (path::has_relative_path, path::has_parent_path)
2519 (path::has_filename, path::_M_find_extension): Add noexcept.
2520
e32f625e 25212019-02-06 Jonathan Wakely <jwakely@redhat.com>
2522
2523 PR libstdc++/89102 (partial)
2524 * include/std/type_traits (common_type<>): Define.
2525 (common_type<T>): Derive from common_type<T, T>.
2526 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2527 Test zero-length template argument list.
2528 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2529 Test additional single argument cases.
2530 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2531 Adjust expected error.
2532
b03489db 25332019-02-05 Jonathan Wakely <jwakely@redhat.com>
2534
e89e4fec 2535 PR libstdc++/89128
2536 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2537 guides.
2538 * include/bits/stl_stack.h (stack): Likewise.
2539 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2540 * testsuite/23_containers/queue/deduction.cc: New test.
2541 * testsuite/23_containers/stack/deduction.cc: New test.
2542
b640dd11 2543 PR libstdc++/89194
2544 * include/std/type_traits (__is_convertible_helper)
2545 (__is_convertible_helper<_From, _To, false>): Revert changes to
2546 support is_nothrow_convertible.
2547 (__is_nt_convertible_helper): New helper.
2548 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2549
74c88c5f 2550 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2551 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2552
eca5e8d4 2553 PR libstdc++/89130
2554 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2555 __is_alloc_insertable_impl. Replace single type member with two
2556 members, one for each of copy and move insertable.
2557 (__is_move_insertable): New trait for internal use.
2558 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2559 (vector::_S_nothrow_relocate(true_type)): New functions to
2560 conditionally check if __relocate_a can throw.
2561 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2562 on __is_move_insertable.
2563 (vector::_S_do_relocate): New overloaded functions to conditionally
2564 call __relocate_a.
2565 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2566 based on _S_use_relocate.
2567 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2568 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2569 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2570
b03489db 2571 PR libstdc++/89090
2572 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2573 parameter unnamed. Add message to static assertion.
2574 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2575 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2576 in C++11 code.
2577
71625a15 25782019-02-05 Marc Glisse <marc.glisse@inria.fr>
2579
2580 PR libstdc++/87106
2581 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2582 Rename...
2583 (__is_bitwise_relocatable): ... to this.
2584 (__relocate_a_1): Adapt.
2585 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2586 (__is_bitwise_relocatable): ... to this.
2587
e7b22e58 25882019-01-30 Jonathan Wakely <jwakely@redhat.com>
2589
2590 PR libstdc++/89117
2591 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2592 final component as well as from _M_pathname. Append the dot using
2593 operator+= instead of only to _M_pathname.
2594 (path::_M_find_extension): Reformat slightly.
2595 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2596 Add more test cases.
2597
dae923a7 25982019-01-30 Ulrich Drepper <drepper@redhat.com>
2599
2600 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2601
710397ad 26022019-01-29 Jonathan Wakely <jwakely@redhat.com>
2603
5efc4356 2604 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2605 constexpr specifiers from arg and proj.
2606
5f15e718 2607 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2608 __shared_ptr instantiations used by gcc4-compatible ABI.
2609
307e86fc 2610 * include/experimental/forward_list (experimental::erase): Qualify
2611 call to erase_if.
2612 * include/experimental/list (experimental::erase): Likewise.
2613 * include/std/forward_list (std::erase): Likewise.
2614 * include/std/list (std::erase): Likewise.
2615
38129d1a 2616 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2617 C++2a.
2618 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2619 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2620 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2621 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2622 * testsuite/ext/array_allocator/26875.cc: Likewise.
2623 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2624 * testsuite/util/replacement_memory_operators.h: Likewise.
2625 * testsuite/util/testsuite_allocator.h: Likewise.
2626
710397ad 2627 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
2628 normal mode vector, even for debug mode.
2629 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
2630 Define alias template for normal mode vector.
2631
70f71249 26322019-01-28 Jonathan Wakely <jwakely@redhat.com>
2633
2634 PR libstdc++/68737
2635 * config/locale/generic/c_locale.h (__convert_from_v)
2636 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2637 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2638 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
2639 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2640
f1074115 26412019-01-24 Jonathan Wakely <jwakely@redhat.com>
2642
4bc4fd90 2643 PR libstdc++/88840
2644 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
2645 data member with static member function _S_use_relocate().
2646 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2647 (vector::_M_default_append): Use _S_use_relocate() instead of
2648 __use_relocate.
2649
f1074115 2650 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
2651 sign of results.
2652
1c4657a3 26532019-01-22 Jonathan Wakely <jwakely@redhat.com>
2654
2655 PR libstdc++/88740
2656 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
2657 write to stderr instead of using printf.
2658
dafe8c59 26592019-01-21 Jakub Jelinek <jakub@redhat.com>
2660
2661 PR libstdc++/86590
2662 * include/bits/char_traits.h (__constant_string_p,
2663 __constant_char_array_p): Use __builtin_is_constant_evaluated if
2664 available.
2665
eaf966f3 26662019-01-20 Ulrich Drepper <drepper@redhat.com>
2667
2668 Implement C++20 P0600r1.
2669 * include/backward/hash_map: Add nodiscard attribute to empty.
2670 * include/backward/hash_set: Likewise.
2671 * backward/hashtable.h: Likewise.
2672 * include/bits/basic_string.h: Likewise.
2673 * include/bits/forward_list.h: Likewise.
2674 * include/bits/hashtable.h: Likewise.
2675 * include/bits/regex.h: Likewise.
2676 * include/bits/stl_deque.h: Likewise.
2677 * include/bits/stl_list.h: Likewise.
2678 * include/bits/stl_map.h: Likewise.
2679 * include/bits/stl_multimap.h: Likewise.
2680 * include/bits/stl_multiset.h: Likewise.
2681 * include/bits/stl_queue.h: Likewise.
2682 * include/bits/stl_set.h: Likewise.
2683 * include/bits/stl_stack.h: Likewise.
2684 * include/bits/stl_tree.h: Likewise.
2685 * include/bits/stl_vector.h: Likewise.
2686 * include/bits/unordered_map.h: Likewise.
2687 * include/bits/unordered_set.h: Likewise.
2688 * include/debug/array: Likewise.
2689 * include/experimental/any: Likewise.
2690 * include/experimental/bits/fs_path.h: Likewise.
2691 * include/experimental/internet: Likewise.
2692 * include/experimental/string_view: Likewise.
2693 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
2694 Likewise.
2695 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
2696 Likewise.
2697 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
2698 Likewise.
2699 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
2700 Likewise.
2701 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
2702 Likewise.
2703 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
2704 Likewise.
2705 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
2706 Likewise.
2707 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
2708 Likewise.
2709 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2710 info_fn_imps.hpp: Likewise.
2711 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2712 left_child_next_sibling_heap_.hpp: Likewise.
2713 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
2714 Likewise.
2715 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
2716 Likewise.
2717 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
2718 Likewise.
2719 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
2720 Likewise.
2721 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
2722 Likewise.
2723 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
2724 Likewise.
2725 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
2726 Likewise.
2727 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
2728 * include/ext/pb_ds/trie_policy.hpp: Likewise.
2729 * include/ext/rope: Likewise.
2730 * include/ext/slist: Likewise.
2731 * include/ext/vstring.h: Likewise.
2732 * include/profile/array: Likewise.
2733 * include/std/array: Likewise.
2734 * include/tr1/array: Likewise.
2735 * include/tr1/hashtable.h: Likewise.
2736 * include/tr1/regex: Likewise.
2737 * include/tr2/dynamic_bitset: Likewise.
2738 * include/bits/alloc_traits.h: Add nodiscard attribute to
2739 allocate.
2740 * include/experimental/memory_resource: Likewise.
2741 * include/ext/alloc_traits.h: Likewise.
2742 * include/ext/array_allocator.h: Likewise.
2743 * include/ext/bitmap_allocator.h: Likewise.
2744 * include/ext/debug_allocator.h: Likewise.
2745 * include/ext/extptr_allocator.h: Likewise.
2746 * include/ext/mt_allocator.h: Likewise.
2747 * include/ext/new_allocator.h: Likewise.
2748 * include/ext/pool_allocator.h: Likewise.
2749 * include/ext/throw_allocator.h: Likewise.
2750 * include/std/scoped_allocator: Likewise.
2751 * libsupc++/eh_alloc.cc: Likewise.
2752 * include/std/future: Add nodiscard attribute to async.
2753 * libsupc++/new: Add nodiscard attribute to new.
2754
3c1c2a8c 27552019-01-18 Jonathan Wakely <jwakely@redhat.com>
2756
2757 PR libstdc++/87514
2758 PR libstdc++/87520
2759 PR libstdc++/88782
2760 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
2761 * include/bits/shared_ptr.h
2762 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
2763 (allocate_shared): Change to use new tag type.
2764 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
2765 Declare new member function.
2766 (_Sp_alloc_shared_tag): Define new type.
2767 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
2768 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
2769 _Sp_make_shared_tag::_S_eq to check type_info.
2770 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
2771 Constrain to prevent being called with _Sp_alloc_shared_tag.
2772 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
2773 Replace constructor with ...
2774 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
2775 reference parameter so address of the new object can be returned to
2776 the caller. Obtain the allocator from the tag type.
2777 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
2778 constructor with ...
2779 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
2780 to the __shared_count constructor.
2781 (__allocate_shared): Change to use new tag type.
2782 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
2783
21a962b2 27842019-01-17 Jonathan Wakely <jwakely@redhat.com>
2785
464ac146 2786 * src/c++17/fs_ops.cc
2787 (equivalent(const path&, const path&, error_code&))
2788 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
2789 compare files instead of relying on incomplete info returned by stat.
2790
2987a93d 2791 PR libstdc++/88884
2792 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
2793 if the path is already absolute.
2794 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
2795 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
2796
21a962b2 2797 PR libstdc++/88881
2798 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
2799 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
2800 of filesystem::exists.
2801 (create_directories(const path&, error_code&)): Add assertions.
2802 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2803 Add workaround for bug in _wstat for paths with trailing slash.
2804 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
2805 for expected behaviour on mingw.
2806 * testsuite/experimental/filesystem/operations/create_directories.cc:
2807 Likewise.
2808 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
2809 "TMP" instead of "TMPDIR" and clean environment before each test. Do
2810 not test permissions on mingw targets.
2811
93478c9f 28122019-01-16 Jonathan Wakely <jwakely@redhat.com>
2813
2814 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
2815 constructors and open members taking wide strings. Fix patterns for
2816 filesystem::path members to match wstring_view parameters. Add
2817 exports for shared_ptr members used by directory iterators.
2818 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
2819 error code parameter if the file doesn't exist.
2820 * src/filesystem/ops.cc (remove(const path&, error_code&)):
2821 Likewise.
2822 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
2823 values for mingw targets, where "/" is not an absolute path. Do not
2824 test symlinks on mingw targets.
2825 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2826 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
2827 on mingw targets.
2828 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2829 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
2830 that each component of the path is created.
2831 * testsuite/experimental/filesystem/operations/create_directories.cc:
2832 Likewise.
2833 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
2834 permissions on mingw targets.
2835 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2836 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2837 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2838 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
2839 mingw targets.
2840 * testsuite/experimental/filesystem/operations/permissions.cc:
2841 Likewise.
2842 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
2843 symlinks or permissions on mingw targets.
2844 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2845 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
2846 symlinks on mingw targets.
2847 * testsuite/experimental/filesystem/operations/remove_all.cc:
2848 Likewise.
2849 * testsuite/27_io/filesystem/operations/status.cc: Do not test
2850 permissions on mingw targets.
2851 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
2852 test symlinks on mingw targets.
2853 * testsuite/experimental/filesystem/operations/space.cc: Fix test
2854 for mingw targets.
2855
af93b844 28562019-02-14 Ulrich Drepper <drepper@redhat.com>
2857
2858 PR libstdc++/88738
2859 Warn about unused comparisons of shared_ptr/unique_ptr
2860 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
2861 * include/bits/shared_ptr.h: Use it for operator ==, !=,
2862 <, <=, >, >= for shared_ptr.
2863 * include/bits/unique_ptr.h: Likewise for unique_ptr.
2864
8793c0de 28652019-01-15 Jonathan Wakely <jwakely@redhat.com>
2866
afa61572 2867 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
2868 as 201611L, because P0497R0 changes are supported.
2869 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
2870
feb89906 2871 * include/bits/erase_if.h [__cplusplus > 201703L]
2872 (__cpp_lib_erase_if): Only define for C++2a.
2873 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2874 (__cpp_lib_null_iterators): Define.
2875 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2876 (__cpp_lib_null_iterators): Define.
2877 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
2878
d253bcb1 2879 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
2880 status.
2881 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
2882 Define.
2883 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
2884 changes are supported.
2885 * include/std/optional (__cpp_lib_optional): Likewise.
2886 * include/std/variant (__cpp_lib_variant): Likewise.
2887 * include/std/version [!__STRICT_ANSI__]
2888 (__cpp_lib_uncaught_exceptions): Define as long integer.
2889 [__cplusplus >= 201703L] (__cpp_lib_any)
2890 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
2891 (__cpp_lib_variant): Define for C++17.
2892 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
2893 as long integer.
2894 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
2895 integer.
2896
8793c0de 2897 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
2898
a8cd4b2b 28992019-01-12 Jonathan Wakely <jwakely@redhat.com>
2900
2901 PR libstdc++/88811
2902 PR libstdc++/83306
2903 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
2904 before second path.
2905 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
2906 test.
2907
a5b1332c 29082019-01-11 Jonathan Wakely <jwakely@redhat.com>
2909
656ac8b7 2910 * doc/xml/manual/intro.xml: Include new section.
2911 * doc/xml/manual/status_cxx2017.xml: Document more
2912 implementation-defined properties of the library.
2913 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
2914 * doc/html/*: Regenerate.
2915
f5480b8c 2916 * include/bits/refwrap.h [__cplusplus > 201703L]
2917 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
2918 (_Reference_wrapper_base_memfun): Do not define for C++2a.
2919 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
2920 for C++2a.
2921 (reference_wrapper::operator()): Add static assertion.
2922 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
2923
36496c4d 2924 * include/std/chrono (duration_values::zero(), duration_values::min())
2925 (duration_values::max()): Add noexcept.
2926 (duration::zero(), duration::min(), duration::max()): Likewise.
2927 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
2928 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
2929 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
2930
a5b1332c 2931 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
2932
d9de68bc 29332019-01-11 Jakub Jelinek <jakub@redhat.com>
2934
2935 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
2936 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
2937
beb370cb 29382019-01-11 Jonathan Wakely <jwakely@redhat.com>
2939
1d628fd4 2940 PR libstdc++/88802
2941 * include/bits/functional_hash.h (hash<nullptr_t>): Define
2942 specialization for C++17 (P0513R0, LWG 2817).
2943 * testsuite/20_util/hash/nullptr.cc: New test.
2944
a18b3766 2945 PR libstdc++/88125
2946 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
2947 pattern for std::basic_stringbuf::str().
2948
beb370cb 2949 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
2950 basic_ostream::operator<< patterns.
2951
cbbb35ec 29522019-01-10 Jonathan Wakely <jwakely@redhat.com>
2953
1715824b 2954 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
2955 test failures on targets with 32-bit time_t.
2956
f5529091 2957 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
2958 * include/std/deque: Likewise.
2959 * include/std/forward_list: Likewise.
2960 * include/std/list: Likewise.
2961 * include/std/string: Likewise.
2962 * include/std/vector: Likewise.
2963 * include/std/version: Likewise.
2964 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
2965 * testsuite/23_containers/deque/erasure.cc: Likewise.
2966 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2967 * testsuite/23_containers/list/erasure.cc: Likewise.
2968 * testsuite/23_containers/map/erasure.cc: Likewise.
2969 * testsuite/23_containers/set/erasure.cc: Likewise.
2970 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2971 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2972 * testsuite/23_containers/vector/erasure.cc: Likewise.
2973
cbbb35ec 2974 * include/experimental/internet [AI_NUMERICSERV]
2975 (resolver_base::numeric_service): Define conditionally.
2976 * testsuite/experimental/net/internet/resolver/base.cc: Test it
2977 conditionally.
2978 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2979 Likewise.
2980
ac9a8436 29812019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2982 Jonathan Wakely <jwakely@redhat.com>
2983
2984 Implement LWG 2221
2985 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
2986 (GLIBCXX_3.4.26): Add new exports.
2987 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
2988 correct list of sources.
2989 * include/Makefile.in: Regenerate.
2990 * include/std/ostream (operator<<(nullptr_t)): New member function.
2991 * src/c++17/ostream-inst.cc: New file.
2992 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
2993 test.
2994
5f027941 29952019-01-10 Jonathan Wakely <jwakely@redhat.com>
2996
2997 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
2998 of the source file containing the caller.
2999 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3000 directories created by test.
3001 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3002 Likewise.
3003 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3004 Likewise.
3005 * testsuite/experimental/filesystem/iterators/
3006 recursive_directory_iterator.cc: Likewise.
3007
3273d2e6 30082019-01-10 Jakub Jelinek <jakub@redhat.com>
3009
3010 PR tree-optimization/88775
3011 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3012 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3013 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3014 instead of __builtin_constant_p if available. Don't bother with
3015 the pointer comparison in C++11 and earlier.
3016
f4d3c071 30172019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3018
3019 PR other/16615
3020
3021 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3022 with "cannot".
3023
8eba10af 30242019-01-09 Jonathan Wakely <jwakely@redhat.com>
3025
6a6ade9f 3026 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3027 for filesystem::path. Give variables more distinctive names.
3028
41cda271 3029 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3030 member function to perform non-trivial assignment.
3031 (_Optional_payload_base::_M_move_assign): Likewise.
3032 (_Optional_payload<T, true, false, true>::operator=)
3033 (_Optional_payload<T, true, true, false>::operator=)
3034 (_Optional_payload<T, true, false, false>::operator=): Call
3035 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3036
8eba10af 3037 PR libstdc++/88204
3038 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3039 test std::complex<long double> if long double format is IBM128.
3040 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3041 Likewise.
3042
64a50f48 30432019-01-08 Jonathan Wakely <jwakely@redhat.com>
3044
73f3ad16 3045 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3046 for old std::unique_ptr layout.
3047 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3048 to become valueless. Add filesystem::path tests.
3049
58e897da 3050 PR libstdc++/87855
3051 * include/std/optional (_Optional_payload_base): New class template
3052 for common code hoisted from _Optional_payload specializations. Use
3053 a template for the union, to allow a partial specialization for
3054 types with non-trivial destructors. Add constructors for in-place
3055 initialization to the union.
3056 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3057 to perform non-trivial copy construction, instead of relying on
3058 non-standard copy elision in a delegating constructor.
3059 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3060 non-trivial move construction.
3061 (_Optional_payload): Derive from _Optional_payload_base and use it
3062 for everything except the non-trivial assignment operators, which are
3063 defined as needed.
3064 (_Optional_payload<false, C, M>): Derive from the specialization
3065 _Optional_payload<true, false, false> and add a destructor.
3066 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3067 Forward to corresponding members of _Optional_payload.
3068 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3069 Hoist common members from _Optional_base.
3070 (_Optional_base): Make all members and base class public.
3071 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3072 _Optional_base_impl.
3073 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3074 support for new std::optional layout.
3075 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3076
64a50f48 3077 PR libstdc++/88066
3078 * include/bits/locale_conv.h: Use <> for includes not "".
3079 * include/ext/random: Likewise.
3080 * include/ext/vstring.h: Likewise.
3081
95b40931 30822019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3083
3084 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3085 (GLIBCXX_3.4.21): Likewise.
3086
fa00ec77 30872019-01-08 Jonathan Wakely <jwakely@redhat.com>
3088
3089 PR libstdc++/88749
3090 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3091 to match the one that controls whether utimbuf and utime are declared.
3092
3f304b2d 30932019-01-07 Jonathan Wakely <jwakely@redhat.com>
3094
fc6ac813 3095 PR libstdc++/87787
3096 * include/bits/char_traits.h (char_traits::move): Do not pass null
3097 pointers to memmove.
3098 * include/bits/locale_facets.h
3099 (ctype<char>::widen(const char*, const char*, char*)): Do not
3100 pass null pointers to memcpy.
3101 (ctype<char>::narrow(const char*, const char*, char, char*)):
3102 Likewise.
3103 (ctype<char>::do_widen(const char*, const char*, char*)):
3104 Likewise.
3105 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3106 Likewise.
3107
bbc66c45 3108 * doc/xml/manual/spine.xml: Update copyright years.
3109 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3110 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3111 for C++17 filesystem library.
3112 * doc/html/*: Regenerate.
3113
3f304b2d 3114 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3115 * config.h.in: Regenerate.
3116 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3117 alphabetically and add missing entries for copy_symlink,
3118 hard_link_count, rename, and resize_file.
3119 * configure: Regenerate.
3120 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3121 used unconditionally.
3122 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3123 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3124 supports truncating to zero length.
3125 * testsuite/27_io/filesystem/operations/all.cc: New test.
3126 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3127
0ebb0980 31282019-01-06 Jonathan Wakely <jwakely@redhat.com>
3129
3935f409 3130 PR libstdc++/86756
3131 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3132 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3133 * config.h.in: Regenerate.
3134 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3135 remaining std::filesystem types and functions.
3136 * configure: Regenerate.
3137 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3138 * src/c++17/Makefile.in: Regenerate.
3139 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3140 here, and change name of included file.
3141 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3142 here, and change name of included file.
3143 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3144 path to dir-common.h.
3145 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3146 path to ops-common.h. Disable -Wunused-parameter warnings.
3147 (internal_file_clock): Define unconditionally.
3148 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3149 define.
3150 (do_copy_file, do_space): Move definitions to ops.common.h.
3151 (copy, file_size, hard_link_count, last_write_time, space): Only
3152 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
3153 report an error.
3154 (last_write_time, read_symlink): Remove unused attributes from
3155 parameters.
3156 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
3157 * src/filesystem/Makefile.in: Regenerate.
3158 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
3159 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
3160 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
3161 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
3162 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
3163 dummy types and functions instead of using #error.
3164 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
3165 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
3166 in terms of stat.
3167 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
3168 (do_copy_file, do_space): Move definitions here from std-ops.cc.
3169 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
3170 to account for new namespace.
3171 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
3172 -lstdc++fs from dg-options.
3173 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
3174 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
3175 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
3176 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
3177 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3178 Likewise.
3179 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
3180 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3181 Likewise.
3182 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
3183 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3184 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
3185 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3186 * testsuite/27_io/filesystem/operations/create_directories.cc:
3187 Likewise.
3188 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
3189 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
3190 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
3191 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
3192 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3193 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
3194 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3195 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
3196 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
3197 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
3198 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
3199 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
3200 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3201 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3202 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
3203 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3204 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3205 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3206 Likewise.
3207 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
3208
3209
c6e37a9f 3210 PR libstdc++/86756
3211 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
3212 typeinfo and vtables less greedy.
3213 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
3214 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
3215 * src/c++17/Makefile.in: Regenerate.
3216 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
3217 here, and change name of included file.
3218 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
3219 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
3220 from sources.
3221 * src/filesystem/Makefile.in: Regenerate.
3222 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
3223 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
3224 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
3225 from dg-options and remove dg-require-filesystem-ts.
3226 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
3227 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
3228 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
3229 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
3230 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3231 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3232 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3233 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
3234 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
3235 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
3236 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
3237 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
3238 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
3239 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
3240 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
3241 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
3242 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
3243 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
3244 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
3245 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
3246 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
3247 Likewise.
3248 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
3249 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
3250 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
3251 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
3252 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
3253 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
3254 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
3255 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
3256 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
3257 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
3258 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
3259 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
3260 Likewise.
3261 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
3262 Likewise.
3263 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3264 Likewise.
3265 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
3266 Likewise.
3267 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
3268 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3269 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
3270 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
3271 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3272 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3273 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3274 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3275 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
3276 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3277 Likewise.
3278 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3279 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3280 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3281 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
3282 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3283
8815ac91 3284 PR libstdc++/87431
3285 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
3286 Check is_trivially_copyable instead of is_scalar.
3287 (variant::emplace<N, Args>(Args&&...)): If construction of the new
3288 contained value can throw and its type is trivially copyable then
3289 construct into a temporary variant and move from it, to provide the
3290 strong exception safety guarantee.
3291 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
3292 Likewise.
3293 * testsuite/20_util/variant/87431.cc: New test.
3294 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
3295 conversion causes valueless state.
3296
0ebb0980 3297 PR libstdc++/88607
3298 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
3299 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
3300 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
3301 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
3302 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
3303
adc6beee 33042019-01-05 Jonathan Wakely <jwakely@redhat.com>
3305
3306 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3307 (file_time_type): Redefine in terms of __file_clock.
3308 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3309 overflow.
3310 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3311 internal linkage.
3312 (internal_file_lock): New helper type for accessing __file_clock.
3313 (do_copy_file): Use internal_file_lock to convert system time to
3314 file_time_type.
3315 (last_write_time(const path&, error_code&)): Likewise.
3316 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3317
6b4a77f2 33182019-01-04 Jonathan Wakely <jwakely@redhat.com>
3319
98185b9f 3320 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3321 for const member functions of std::basic_string.
3322 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3323 in C++17.
3324 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3325 Make non-standard constructor private.
3326 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3327 Likewise.
3328 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3329 explicit instantiations for C++17 as well as earlier dialects.
3330 * src/c++17/Makefile.am: Add new source files.
3331 * src/c++17/Makefile.in: Regenerate.
3332 * src/c++17/cow-string-inst.cc: New file defining explicit
3333 instantiations for basic_string member functions added in C++17.
3334 * src/c++17/string-inst.cc: Likewise.
3335
859e6fed 3336 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3337 copy/move constructors for old std::basic_string.
3338 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3339 (basic_string::reference, basic_string::const_reference): Define
3340 as plain references for C++11 and later.
3341 (basic_string::basic_string()): Put constructor body outside
3342 preprocessor conditional groups.
3343 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3344 instead of copying it.
3345 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3346 Define.
3347 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3348 Define.
3349 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3350 cases for old basic_string.
3351 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3352 allocator-extended constructors unconditionally. Add extra members to
3353 allocator type when using old string ABI.
3354 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3355 for old string ABI.
3356 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3357
e13f6a7f 3358 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3359 -fno-inline added to test flags.
3360
a18fccd0 3361 * testsuite/21_strings/basic_string/requirements/
3362 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3363
7f77ca07 3364 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3365 assertion failures with old std::string ABI.
3366
9346fb0e 3367 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3368 with ...
3369 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3370 functions that will only erase elements at the end.
3371 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3372 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3373 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3374 of erase(p, end()).
3375 (path::_List::pop_back()): Define.
3376 (path::_List::_M_erase_from(const_iterator)): Define.
3377 (path::operator/=(const path&)): Use pop_back to remove last component
3378 and _M_erase_from to remove multiple components.
3379 (path::_M_append(basic_string_view<value_type>)): Likewise.
3380 (path::operator+=(const path&)): Likewise.
3381 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3382 (path::remove_filename()): Likewise.
3383 (path::lexically_normal()): Use _List::_Impl iterators instead of
3384 path::iterator. Use pop_back to remove components from the end. Clear
3385 trailing filename, instead of using erase(const_iterator) to remove
3386 a non-final component.
3387 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3388 additional cases.
3389 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3390
24230cab 3391 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3392 incorrect treatment of empty filename after trailing slash.
3393 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3394
6b4a77f2 3395 * testsuite/21_strings/basic_string/modifiers/assign/char/
3396 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3397 to test flags.
3398 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3399 move_assign_optim.cc: Likewise.
3400
02df5941 34012019-01-03 Jonathan Wakely <jwakely@redhat.com>
3402 Jakub Jelinek <jakub@redhat.com>
3403
3404 PR libstdc++/88607
3405 * include/experimental/memory: Replace UTF-8 quote characters.
3406 * include/std/future: Replace UTF-8 "em dash" characters.
3407
f8ad40d8 34082019-01-03 Jonathan Wakely <jwakely@redhat.com>
3409
9013258b 3410 PR libstdc++/88607
3411 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3412 * include/debug/forward_list: Likewise.
3413 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3414 character.
3415 * include/experimental/chrono: Likewise.
3416 * include/experimental/functional: Likewise.
3417 * include/experimental/ratio: Likewise.
3418 * include/experimental/system_error: Likewise.
3419 * include/experimental/tuple: Likewise.
3420 * include/experimental/type_traits: Likewise.
3421 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3422 * include/parallel/multiseq_selection.h: Likewise.
3423
f8ad40d8 3424 PR libstdc++/88681
3425 * config/abi/pre/gnu.ver: Add missing exports.
3426 * testsuite/22_locale/collate_byname/88681.cc: New test.
3427 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3428 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3429
138292f4 34302019-01-02 Jonathan Wakely <jwakely@redhat.com>
3431
553d41a8 3432 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3433 initializer_list<value_type> and from input iterator ranges.
3434 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3435
138292f4 3436 * testsuite/experimental/string_view/element_access/char/empty.cc:
3437 Fix year range in copyright header.
3438
963c0125 34392019-01-02 Joel Brobecker <brobecker@adacore.com>
3440
3441 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3442 Fix year range in copyright header.
3443
fbd26352 34442019-01-01 Jakub Jelinek <jakub@redhat.com>
d353bf18 3445
3446 Update copyright years.
fb96fbb3 3447\f
fbd26352 3448Copyright (C) 2019 Free Software Foundation, Inc.
fb96fbb3 3449
3450Copying and distribution of this file, with or without modification,
3451are permitted in any medium without royalty provided the copyright
3452notice and this notice are preserved.