Do not declare std::uses_allocator before C++11
[gcc.git] / libstdc++-v3 / ChangeLog
1 2019-10-22 Jonathan Wakely <jwakely@redhat.com>
2
3 * include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
4 * testsuite/17_intro/names.cc: Check uses_allocator in C++98.
5
6 * include/bits/alloc_traits.h
7 (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20.
8 (allocator_traits<allocator<T>>::construct): Perform placement new
9 directly for C++20, instead of calling allocator<T>::construct.
10 (allocator_traits<allocator<T>>::destroy): Call destructor directly
11 for C++20, instead of calling allocator<T>::destroy.
12 (allocator_traits<allocator<T>>::max_size): Return value directly
13 for C++20, instead of calling std::allocator<T>::max_size().
14 (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not
15 define for C++17 and up.
16 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr
17 for C++17 and up, instead of tag dispatching.
18 * include/bits/allocator.h (allocator<void>): Remove for C++20.
19 (allocator::pointer, allocator::const_pointer, allocator::reference)
20 (allocator::const_reference, allocator::rebind): Remove for C++20.
21 * include/bits/basic_string.h (basic_string): Use __alloc_traits to
22 rebind allocator.
23 * include/bits/memoryfwd.h (allocator<void>): Remove for C++20.
24 * include/ext/debug_allocator.h: Use __alloc_traits for rebinding.
25 * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator)
26 (malloc_allocator::pointer, malloc_allocator::const_pointer)
27 (malloc_allocator::reference, malloc_allocator::const_reference)
28 (malloc_allocator::rebind, malloc_allocator::max_size)
29 (malloc_allocator::construct, malloc_allocator::destroy): Do not
30 define for C++20.
31 (malloc_allocator::_M_max_size): Define new function.
32 * include/ext/new_allocator.h (new_allocator::~new_allocator)
33 (new_allocator::pointer, new_allocator::const_pointer)
34 (new_allocator::reference, new_allocator::const_reference)
35 (new_allocator::rebind, new_allocator::max_size)
36 (new_allocator::construct, new_allocator::destroy): Do not
37 define for C++20.
38 (new_allocator::_M_max_size): Define new function.
39 * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use
40 __alloc_traits to rebind allocator.
41 * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise.
42 (rope::rope(CharT, const allocator_type&)): Use __alloc_traits
43 to construct character.
44 * include/ext/slist (_Slist_base): Use __alloc_traits to rebind
45 allocator.
46 * include/ext/sso_string_base.h (__sso_string_base::_M_max_size):
47 Use __alloc_traits.
48 * include/ext/throw_allocator.h (throw_allocator): Do not use optional
49 members of std::allocator, use __alloc_traits members instead.
50 * include/ext/vstring.h (__versa_string): Use __alloc_traits.
51 * include/ext/vstring_util.h (__vstring_utility): Likewise.
52 * include/std/memory: Include <bits/alloc_traits.h>.
53 * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size.
54 * testsuite/20_util/allocator/rebind_c++20.cc: New test.
55 * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check
56 for pointer, const_pointer, reference, const_reference or rebind in
57 C++20.
58 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test.
59 * testsuite/23_containers/deque/capacity/29134.cc: Use
60 __gnu_test::max_size.
61 * testsuite/23_containers/forward_list/capacity/1.cc: Likewise.
62 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
63 * testsuite/23_containers/map/capacity/29134.cc: Likewise.
64 * testsuite/23_containers/multimap/capacity/29134.cc: Likewise.
65 * testsuite/23_containers/multiset/capacity/29134.cc: Likewise.
66 * testsuite/23_containers/set/capacity/29134.cc: Likewise.
67 * testsuite/23_containers/vector/capacity/29134.cc: Likewise.
68 * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run
69 test for C++20.
70 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
71 * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size.
72 * testsuite/util/replacement_memory_operators.h: Do not assume
73 Alloc::pointer exists.
74 * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define
75 helper to call max_size for any allocator.
76
77 2019-10-22 Andreas Schwab <schwab@suse.de>
78
79 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
80
81 2019-10-18 Jonathan Wakely <jwakely@redhat.com>
82
83 PR libstdc++/92143
84 * libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment
85 to at least sizeof(void*).
86
87 * include/bits/range_cmp.h (ranges::less::operator()): Inline the
88 logic from std::less::operator() to remove the dependency on it.
89
90 2019-10-17 Jonathan Wakely <jwakely@redhat.com>
91
92 * doc/doxygen/user.cfg.in (INPUT): Add new C++17 and C++20 headers.
93
94 * include/Makefile.am: Add new header.
95 * include/Makefile.in: Regenerate.
96 * include/bits/range_cmp.h: New header for C++20 function objects.
97 * include/std/functional: Include new header.
98 * testsuite/20_util/function_objects/identity/1.cc: New test.
99 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: New test.
100 * testsuite/20_util/function_objects/range.cmp/greater.cc: New test.
101 * testsuite/20_util/function_objects/range.cmp/greater_equal.cc: New
102 test.
103 * testsuite/20_util/function_objects/range.cmp/less.cc: New test.
104 * testsuite/20_util/function_objects/range.cmp/less_equal.cc: New test.
105 * testsuite/20_util/function_objects/range.cmp/not_equal_to.cc: New
106 test.
107
108 PR libstdc++/92124
109 * include/bits/forward_list.h
110 (_M_move_assign(forward_list&&, false_type)): Do not use
111 __make_move_if_noexcept, instead move unconditionally.
112 * include/bits/stl_deque.h (_M_move_assign2(deque&&, false_type)):
113 Likewise.
114 * include/bits/stl_list.h (_M_move_assign(list&&, false_type)):
115 Likewise.
116 * include/bits/stl_vector.h (_M_move_assign(vector&&, false_type)):
117 Likewise.
118 * testsuite/23_containers/vector/92124.cc: New test.
119
120 2019-10-16 Jonathan Wakely <jwakely@redhat.com>
121
122 * include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to
123 one of __is_same_as or __is_same when available.
124 * include/std/concepts (__detail::__same_as): Use std::is_same_v.
125 * include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]:
126 Use new macro instead of __is_same_as.
127 (is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial
128 specialization.
129 (is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro.
130 (is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same.
131
132 2019-10-16 François Dumont <fdumont@gcc.gnu.org>
133
134 * src/c++11/debug.cc (print_field): Replace constness_names <unknown>
135 entry with <unknown constness>. Replace state_names <unknown> entry with
136 <unknown state>.
137
138 2019-10-11 Jonathan Wakely <jwakely@redhat.com>
139
140 * include/Makefile.am: Add new header.
141 * include/Makefile.in: Regenerate.
142 * include/precompiled/stdc++.h: Include <concepts>.
143 * include/std/concepts: New header for C++20.
144 * include/std/version (__cpp_lib_concepts): Define.
145 * scripts/create_testsuite_files: Look for test files in new std
146 directory.
147 * testsuite/libstdc++-dg/conformance.exp: Likewise.
148 * testsuite/std/concepts/concepts.callable/invocable.cc: New test.
149 * testsuite/std/concepts/concepts.callable/regular_invocable.cc: New
150 test.
151 * testsuite/std/concepts/concepts.callable/relation.cc: New test.
152 * testsuite/std/concepts/concepts.callable/strictweakorder.cc: New
153 test.
154 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
155 floating_point.cc: New test.
156 * testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc:
157 New test.
158 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
159 signed_integral.cc: New test.
160 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
161 unsigned_integral.cc: New test.
162 * testsuite/std/concepts/concepts.lang/concept.assignable/1.cc: New
163 test.
164 * testsuite/std/concepts/concepts.lang/concept.common/1.cc: New test.
165 * testsuite/std/concepts/concepts.lang/concept.commonref/1.cc: New
166 test.
167 * testsuite/std/concepts/concepts.lang/concept.constructible/1.cc:
168 New test.
169 * testsuite/std/concepts/concepts.lang/concept.convertible/1.cc:
170 New test.
171 * testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc:
172 New test.
173 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/
174 1.cc: New test.
175 * testsuite/std/concepts/concepts.lang/concept.derived/1.cc:
176 New test.
177 * testsuite/std/concepts/concepts.lang/concept.destructible/1.cc:
178 New test.
179 * testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc:
180 New test.
181 * testsuite/std/concepts/concepts.lang/concept.same/1.cc:
182 New test.
183 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
184 New test.
185 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
186 New test.
187 * testsuite/std/concepts/concepts.lang/concept.swappable/
188 swappable_with.cc: New test.
189 * testsuite/std/concepts/concepts.object/copyable.cc: New test.
190 * testsuite/std/concepts/concepts.object/movable.cc: New test.
191 * testsuite/std/concepts/concepts.object/regular.cc: New test.
192 * testsuite/std/concepts/concepts.object/semiregular.cc: New test.
193
194 * include/std/type_traits (is_same): Replace partial specialization
195 by using __is_same_as built-in in primary template.
196 (is_same_v): Use __is_same_as built-in instead of instantiating the
197 is_same trait.
198
199 PR libstdc++/92059
200 * include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
201 special member functions as defaulted. Add noexcept to most members.
202 (__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)):
203 Mask off unwanted bits in the __val parameter. Avoid undefined left
204 shifts.
205 (__dynamic_bitset_base::_M_assign): Remove.
206 (__dynamic_bitset_base::_M_do_reset): Use std::fill.
207 (__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when
208 block_type has lower rank than int.
209 (dynamic_bitset): Add noexcept to most members. Use injected-class-name
210 in return types and parameter types.
211 (dynamic_bitset::_M_Nb): Add default member initializer.
212 (dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as
213 defaulted.
214 (dynamic_bitset(dynamic_bitset&&)): Clear source object after move.
215 (dynamic_bitset::operator=(const dynamic_bitset&)): Define as
216 defaulted.
217 (dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier.
218 Define without using swap, to propagate allocator correctly.
219 (dynamic_bitset(const char*, const _Alloc&)): Use strlen.
220 (dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use
221 casts to avoid unwanted integer promotions.
222 (dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and
223 add default template arguments and default argument to simplify usage.
224 (dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr.
225 (operator==(const dynamic_bitset&, const dynamic_bitset&))
226 (operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb.
227 * include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr):
228 Adjust template parameters to match declaration.
229 * testsuite/tr2/dynamic_bitset/cmp.cc: New test.
230 * testsuite/tr2/dynamic_bitset/cons.cc: New test.
231 * testsuite/tr2/dynamic_bitset/copy.cc: New test.
232 * testsuite/tr2/dynamic_bitset/move.cc: New test.
233 * testsuite/tr2/dynamic_bitset/pr92059.cc: New test.
234
235 * include/bits/charconv.h (__to_chars_len): Avoid -Wsign-compare
236 warnings.
237
238 2019-10-10 Jonathan Wakely <jwakely@redhat.com>
239
240 PR libstdc++/91057
241 * src/c++98/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]
242 (find_ldbl_sync_facet): Fix parameter type and missing return.
243
244 2019-10-09 Marek Polacek <polacek@redhat.com>
245
246 PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound.
247 PR c++/69531 - DR 1307: Differently bounded array parameters.
248 PR c++/88128 - DR 330: Qual convs and pointers to arrays of pointers.
249 * testsuite/23_containers/span/lwg3255.cc: Adjust test to match the
250 post-P0388R4 behavior.
251
252 2019-10-09 Jonathan Wakely <jwakely@redhat.com>
253
254 PR libstdc++/91057
255 * src/c++98/locale.cc (locale::id::_M_id()) [__GTHREADS]: Use atomic
256 compare-exchange or double-checked lock to ensure only one thread sets
257 the _M_index variable.
258 [_GLIBCXX_LONG_DOUBLE_COMPAT]: Call find_ldbl_sync_facet to detect
259 facets that share another facet's ID.
260 [_GLIBCXX_LONG_DOUBLE_COMPAT] (find_ldbl_sync_facet): New function.
261
262 PR libstdc++/78552
263 * src/c++98/locale_init.cc (locale::classic()): Do not construct a new
264 locale object for every call.
265 (locale::_S_initialize_once()): Construct C locale here.
266
267 2019-10-08 Jonathan Wakely <jwakely@redhat.com>
268
269 * doc/Makefile.am (doc-html-docbook-regenerate): New target.
270 (${docbook_outdir}/html): Do not create unused 'html/ext' directory.
271 * doc/Makefile.in: Regenerate.
272 * doc/xml/manual/documentation_hacking.xml: Document new target.
273 * doc/html/*: Regenerate.
274
275 * doc/xml/manual/allocator.xml: Use archived copy of CUJ article.
276 * doc/html/*: Regenerate.
277
278 2019-10-06 François Dumont <fdumont@gcc.gnu.org>
279
280 * include/bits/stl_algo.h
281 (__copy_n_a(_IIte, _Size, _OIte)): New.
282 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
283 (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
284 latter.
285 * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
286 std::__copy_n_a friend.
287 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
288 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
289 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
290 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.
291
292 * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define
293 for C++11.
294 (_RequireInputIte): Likewise and use __enable_if_t.
295 * include/std/numeric
296 (__is_random_access_iter): Use __iterator_category_t.
297
298 * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment
299 debug checks.
300 * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New.
301 * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New.
302
303 2019-10-04 François Dumont <fdumont@gcc.gnu.org>
304
305 * include/debug/forward_list
306 (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign
307 distance when not empty.
308 * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size):
309 Likewise.
310 * include/debug/helper_functions.h (__dp_sign_max_size): New
311 _Distance_precision enum entry.
312 (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type,
313 __false_type)): Adapt.
314 * include/debug/safe_iterator.tcc
315 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review
316 distance computation.
317
318 2019-10-04 Jonathan Wakely <jwakely@redhat.com>
319
320 PR libstdc++/81091
321 PR libstdc++/91947
322 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
323 * config.h.in: Regenerate:
324 * configure: Regenerate:
325 * include/Makefile.am (${host_builddir}/largefile-config.h): New
326 target to generate config header for filesystem library.
327 (${host_builddir}/c++config.h): Rename macros for large file support.
328 * include/Makefile.in: Regenerate.
329 * src/c++17/fs_dir.cc: Include new config header.
330 * src/c++17/fs_ops.cc: Likewise.
331 (filesystem::file_size): Use uintmax_t for size.
332 * src/filesystem/dir.cc: Include new config header.
333 * src/filesystem/ops.cc: Likewise.
334 (experimental::filesystem::file_size): Use uintmax_t for size.
335
336 * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
337 std::tr1::unordered_map.
338 * testsuite/util/testsuite_allocator.h: Likewise.
339
340 * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.
341
342 * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
343 __gnu_cxx::__alloc_traits for allocator construct function.
344 (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function.
345
346 * include/precompiled/stdc++.h: Include <span> for C++20.
347 * testsuite/17_intro/names.cc: Do not define 'e' for C++20.
348
349 2019-10-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
350
351 * include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp.
352
353 2019-10-02 Jonathan Wakely <jwakely@redhat.com>
354
355 * config/abi/pre/gnu.ver: Tighten up greedy wildcards.
356
357 * doc/xml/manual/parallel_mode.xml: Add caveat about support for
358 recent standards.
359 * doc/html/*: Regenerate.
360
361 2019-10-01 Jonathan Wakely <jwakely@redhat.com>
362
363 * include/experimental/algorithm (experimental::sample): Qualify call
364 to __sample correctly.
365 * include/parallel/algo.h (sample, for_each_n): Add using-declarations
366 for algorithms that don't have parallel implementations.
367
368 * include/parallel/algobase.h (equal, lexicographical_compare): Add
369 _GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
370 constant evaluated.
371 * include/parallel/algorithmfwd.h (equal, lexicographical_compare):
372 Add _GLIBCXX20_CONSTEXPR.
373
374 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for
375 parallel mode.
376 * testsuite/20_util/hash/84998.cc: Likewise.
377 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise.
378 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise.
379 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
380 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
381 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
382 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
383 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
384 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
385 Likewise.
386 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
387 Likewise.
388 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
389 Likewise.
390 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
391 Likewise.
392 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
393 Likewise.
394 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise.
395 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
396 * testsuite/25_algorithms/copy/86658.cc: Likewise.
397 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
398 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
399 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
400 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
401
402 * include/parallel/algo.h: Replace non-reserved names.
403 * include/parallel/multiway_merge.h: Likewise.
404 * include/parallel/multiway_mergesort.h: Likewise.
405 * include/parallel/numericfwd.h: Likewise.
406 * testsuite/17_intro/names.cc: Add RAI to test macros.
407
408 2019-09-30 François Dumont <fdumont@gcc.gnu.org>
409
410 * include/debug/array: Add C++20 constexpr to comparison operators.
411 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt
412 dg-error line numbers.
413 * testsuite/23_containers/array/tuple_interface/
414 tuple_element_debug_neg.cc: Likewise.
415
416 2019-09-30 Andreas Tobler <andreast@gcc.gnu.org>
417
418 * include/experimental/internet: Include netinet/in.h if we have
419 _GLIBCXX_HAVE_NETINET_IN_H defined.
420
421 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
422 FreeBSD warning about lower advertised precision of tgammal.
423 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
424 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
425 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
426 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
427 * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
428 * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
429 * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
430 * testsuite/tr1/5_numerical_facilities/special_functions/
431 08_cyl_bessel_i/check_nan.cc: Likewise.
432 * testsuite/tr1/5_numerical_facilities/special_functions/
433 09_cyl_bessel_j/check_nan.cc: Likewise.
434 * testuite/tr1/5_numerical_facilities/special_functions/
435 10_cyl_bessel_k/check_nan.cc: Likewise.
436 * testsuite/tr1/5_numerical_facilities/special_functions/
437 11_cyl_neumann/check_nan.cc: Likewise.
438 * testsuite/tr1/5_numerical_facilities/special_functions/
439 21_sph_bessel/check_nan.cc: Likewise.
440 * testsuite/tr1/5_numerical_facilities/special_functions/
441 23_sph_neumann/check_nan.cc: Likewise.
442
443 2019-09-30 Jonathan Wakely <jwakely@redhat.com>
444
445 * include/std/span (span(element_type(&)[N]))
446 (span(array<value_type, N>&), span(const array<value_type, N>&)):
447 Deduce array element type to allow safe const conversions (LWG 3255).
448 [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use
449 remove_cv_t on arguments to __is_std_span and __is_std_array.
450 * testsuite/23_containers/span/lwg3255.cc: New test.
451
452 PR libstdc++/77936
453 * include/parallel/checkers.h (__is_sorted): Remove unused variable.
454
455 2019-09-28 François Dumont <fdumont@gcc.gnu.org>
456
457 * include/bits/stl_algo.h (merge): Fix documentation.
458 * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr.
459 (__check_sorted): Likewise and remove nested irreflexive check.
460 (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr.
461 (__check_partitioned_lower, __check_partitioned_upper): Likewise.
462 (_Irreflexive_checker::_S_is_valid): Likewise.
463 (__is_irreflexive, __is_irreflexive_pred): Likewise.
464 * include/debug/helper_functions.h (__get_distance): Add constexpr.
465 (__valid_range_aux): Add C++20 constexpr.
466 (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)):
467 Likewise and add std::is_constant_evaluated check.
468 (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New.
469 (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New.
470 (__valid_range_aux(_Integral, _Integral, std::__true_type)): New,
471 use latter.
472 (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and
473 __builtin_is_contant_evaludated check..
474 (__can_advance, __base): Add constexpr.
475 * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED]
476 (_GLIBCXX_DEBUG_VERIFY_COND_AT): New.
477 (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive.
478 (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred.
479 * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive
480 std::less.
481 * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
482 * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix
483 lambda to be irreflexive.
484
485 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
486
487 * configure: Regenerate.
488
489 2019-09-27 Jonathan Wakely <jwakely@redhat.com>
490
491 PR libstdc++/91910
492 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer
493 atomically and lock the mutex before accessing the sequence.
494 (_Safe_local_iterator_base::_M_detach()): Likewise.
495 (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
496
497 2019-09-26 Jonathan Wakely <jwakely@redhat.com>
498
499 * include/debug/array (to_array): Define for debug mode.
500
501 * include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to
502 piecewise construction constructor, assignment operators, and swap.
503 * include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)):
504 Add _GLIBCXX20_CONSTEXPR.
505 (pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise.
506 * testsuite/20_util/pair/constexpr_assign.cc: New test.
507 * testsuite/20_util/pair/constexpr_swap.cc: New test.
508
509 * include/experimental/internet (operator==, operator<): Fix loop
510 condition to avoid reading past the end of the array.
511
512 * include/std/array: Remove references to profile mode.
513 * include/std/bitset: Likewise.
514 * include/std/deque: Likewise.
515 * include/std/forward_list: Likewise.
516 * include/std/list: Likewise.
517 * include/std/map: Likewise.
518 * include/std/set: Likewise.
519 * include/std/unordered_map: Likewise.
520 * include/std/unordered_set: Likewise.
521 * include/std/vector: Likewise.
522 * testsuite/17_intro/headers/c++1998/profile_mode.cc: New test.
523 * testsuite/17_intro/headers/c++2011/profile_mode.cc: New test.
524
525 2019-09-25 Jonathan Wakely <jwakely@redhat.com>
526
527 * include/bits/regex.h
528 (basic_regex::assign(const C*, size_t, flag_type)): Add default
529 argument (LWG 3296).
530 * testsuite/28_regex/basic_regex/assign/char/lwg3296.cc: New test.
531 * testsuite/28_regex/basic_regex/assign/wchar_t/lwg3296.cc: New test.
532
533 2019-09-24 Jonathan Wakely <jwakely@redhat.com>
534
535 * include/std/variant (variant::index()): Remove impossible case.
536
537 PR libstdc++/91871
538 * testsuite/util/testsuite_hooks.h
539 (conversion::iterator_to_const_iterator()): Do not return an invalid
540 iterator. Test direct-initialization and direct-list-initialization
541 as well as implicit conversion.
542
543 2019-09-23 Jonathan Wakely <jwakely@redhat.com>
544
545 PR libstdc++/91788 (partial)
546 * include/std/variant (variant::index()): Improve codegen for cases
547 where conversion to size_t already works correctly.
548
549 2019-09-23 Andreas Schwab <schwab@suse.de>
550
551 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
552
553 2019-09-12 Jonathan Wakely <jwakely@redhat.com>
554
555 PR libstdc++/91748
556 * include/bits/stl_algo.h (for_each_n): Fix random access iterator
557 case.
558 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
559 access iterators.
560
561 2019-09-11 Jonathan Wakely <jwakely@redhat.com>
562
563 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
564 Fix syntax error.
565
566 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
567 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
568 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile
569 for C++2a and up.
570
571 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
572
573 * include/std/type_traits (__do_common_type_impl): Implement
574 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20.
575 (basic_common_reference, common_reference, common_reference_t): Define
576 for C++20.
577 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New
578 test.
579 * testsuite/20_util/common_reference/requirements/
580 explicit_instantiation.cc: New test.
581 * testsuite/20_util/common_reference/requirements/typedefs.cc: New
582 test.
583
584 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
585 non-template overloads for each signed and unsigned integer type and
586 char. Define deleted overload for bool (LWG 3266).
587 * testsuite/20_util/to_chars/1_neg.cc: Remove.
588 * testsuite/20_util/to_chars/3.cc: New test.
589 * testsuite/20_util/to_chars/lwg3266.cc: New test.
590
591 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
592
593 * acinclude.m4: Handle uclinux*.
594 * configure: Regenerate.
595 * configure.host: Handle uclinux*
596
597 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
598 Mickaël Guêné <mickael.guene@st.com>
599
600 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
601 support.
602
603 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
604
605 PR libstdc++/91711
606 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
607 0ul being a valid null pointer constant.
608
609 * include/std/type_traits (__remove_cv_t): New alias template.
610 (is_void, is_integral, is_floating_point, is_pointer)
611 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
612 (is_member_point), __is_signed_integer, __is_unsigned_integer)
613 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
614 (__decay_selector): Use __remove_cv_t.
615 (remove_cv): Add partial specializations for cv-qualified types.
616 (__decay_t): New alias template.
617 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
618 __decay_t.
619 (__enable_if_t): Move earlier in the file.
620 (_Require): Use __enable_if_t.
621 (swap(T&, T&)): Use _Require.
622 (swap(T(&)[N])): Use __enable_if_t.
623
624 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
625
626 Implement C++20 p1424 - 'constexpr' feature macro concerns,
627 Issue 3256 - Feature testing macro for constexpr algorithms,
628 and Issue 3257 - Missing feature testing macro update from P0858.
629 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
630 * include/bits/algorithmfwd.h: Ditto.
631 * include/std/utility: Ditto.
632 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
633 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
634 __cpp_lib_constexpr macro in <algorith>.
635 * testsuite/20_util/exchange/constexpr.cc: Add check for
636 __cpp_lib_constexpr macro in <utility>.
637 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
638 __cpp_lib_constexpr_algorithms.
639 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
640 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
641 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
642 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
643 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
644 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
645 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
646 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
647 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
648 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
649 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
650 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
651 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
652 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
653 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
654 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
655 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
656 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
657 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
658 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
659 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
660 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
661 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
662 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
663 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
664 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
665 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
666 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
667 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
668 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
669 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
670 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
671 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
672 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
673 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
674 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
675 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
676 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
677 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
678 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
679 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
680 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
681 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
682 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
683 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
684 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
685 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
686 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
687 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
688 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
689 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
690 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
691 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
692
693 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
694
695 Update docs for recent <span> and constexpr lib changes.
696 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
697 p1023r0, p1085r2 status.
698 * doc/html/manual/status.html: Regenerate.
699
700 2019-09-09 Antony Polukhin <antoshkka@gmail.com>
701
702 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
703 final offsets with constants.
704
705 2019-09-09 Jonathan Wakely <jwakely@redhat.com>
706
707 * include/bits/range_access.h (__adl_to_address): Remove.
708 * include/std/span (__is_base_derived_safe_convertible_v): Replace
709 with span::__is_compatible.
710 (__is_std_array_v): Replace with __is_std_array class template and
711 partial specializations.
712 (__is_std_array, __is_std_span): New class templates and partial
713 specializations.
714 (span::__is_compatible): New alias template for SFINAE constraints.
715 (span::span(element_type (&)[N])): Remove redundant constraints. Do
716 not use __adl_data to obtain a pointer.
717 (span::span(array<value_type, N>&)): Likewise.
718 (span::span(const array<value_type, N>&)): Likewise.
719 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
720 (span::iter_value_t, span::derived_from): New alias templates for
721 SFINAE constraints, until the equivalents are supported in <concepts>
722 and <iterator>.
723 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
724 for SFINAE constraints.
725 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
726 SFINAE constraints.
727 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
728 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
729 Use std::to_address instead of __adl_to_address.
730 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
731 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
732 template for SFINAE constraints.
733 [!_GLIBCXX_P1394] (span::span(Container&))
734 (span::span(const Container&)): Improve constraints.
735 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
736 (span::span(pointer, pointer)): Remove redundant cast of pointer.
737 (span(const span<OType, OExtent>&)): New constructor.
738
739 2019-09-06 Jonathan Wakely <jwakely@redhat.com>
740
741 * include/bits/range_access.h (ssize): Define for C++20.
742 * testsuite/24_iterators/range_access_cpp20.cc: New test.
743 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
744 * doc/html/*: Regenerate.
745
746 2019-09-06 Florian Weimer <fweimer@redhat.com>
747
748 * configure: Regenerate.
749
750 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
751
752 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
753 P1024R3. Remove entry for P0920R2.
754 * include/std/span (__cpp_lib_span): Change value.
755 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
756 constructor.
757 (span): Replace __extent_storage base class with data member.
758 (span::_S_subspan_extent): New function.
759 (span::empty()): Add nodiscard attribute.
760 (span::front, span::back, span::operator[]): Check preconditions.
761 (span::first, span::last, span::subspan): Add noexcept. Improve
762 precondition checks (LWG 3103).
763 (get): Remove redundant condition from static_assert.
764 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
765 (as_writable_bytes): Add inline specifier.
766 * include/std/version (__cpp_lib_span): Change value.
767 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
768 * testsuite/23_containers/span/front_neg.cc: Likewise.
769 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
770 * testsuite/23_containers/span/last_neg.cc: Improve test.
771 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
772 * testsuite/23_containers/span/1.cc: New test.
773 * testsuite/23_containers/span/2.cc: New test.
774 * testsuite/23_containers/span/back_assert_neg.cc: New test.
775 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
776 * testsuite/23_containers/span/first_assert_neg.cc: New test.
777 * testsuite/23_containers/span/first_neg.cc: New test.
778 * testsuite/23_containers/span/front_assert_neg.cc: New test.
779 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
780 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
781 * testsuite/23_containers/span/last_assert_neg.cc: New test.
782 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
783 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
784 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
785 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
786 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
787 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
788
789 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
790
791 * include/Makefile.am: Add <span> header.
792 * include/Makefile.in: Regenerate.
793 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
794 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
795 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
796 New functions for performing argument-dependent lookup of range
797 customization points.
798 * include/bits/stl_iterator.h (__normal_iterator): Add
799 _GLIBCXX20_CONSTEXPR to all functions.
800 * include/std/span: New header.
801 * include/std/version (__cpp_lib_span): Define feature test macro.
802 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
803 * testsuite/23_containers/span/everything.cc: New test.
804 * testsuite/23_containers/span/get_neg.cc: New test.
805 * testsuite/23_containers/span/last_neg.cc: New test.
806 * testsuite/23_containers/span/subspan_neg.cc: New test.
807 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
808 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
809 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
810
811 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
812
813 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
814 * doc/html/*: Regenerate.
815
816 2019-09-04 Mike Crowe <mac@mcrowe.com>
817
818 PR libstdc++/41861
819 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
820 pthread_cond_clockwait function.
821 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
822 * configure: Regenerate.
823 * config.h.in: Regenerate.
824 * include/std/condition_variable: (condition_variable): Rename
825 __steady_clock_t typedef and add system_clock. Change __clock_t to be
826 a typedef for the preferred clock to convert arbitrary other clocks to.
827 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
828 overload.
829 (wait_until): Change __clock_t overload to use system_clock.
830 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
831 steady_clock overload that calls pthread_cond_clockwait.
832 (__wait_until_impl): Change __clock_t overload to use system_clock.
833 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
834 steady_clock for __clock_t if pthread_cond_clockwait is available.
835
836 2019-09-04 Mike Crowe <mac@mcrowe.com>
837
838 * testsuite/30_threads/condition_variable/members/2.cc (test01):
839 Parameterise so that test can be run against an arbitrary clock.
840 (main): Test using std::chrono::steady_clock and a user-defined
841 clock in addition to the previous std::chrono::system_clock.
842 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
843
844 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
845
846 * crossconfig.m4: Remove references to spu.
847 * configure: Regenerate.
848 * doc/xml/manual/appendix_contributing.xml: Remove references
849 to __ea as "badword" for spu.
850 * doc/html/manual/source_code_style.html: Regenerate.
851 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
852 to avoid __ea (as "badword" for spu).
853 (__ellint_rj): Likewise.
854
855 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
856
857 PR other/79543
858 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
859 scanning to conform to the GNU Coding Standards.
860 * configure: Regenerate.
861
862 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
863
864 * src/c++17/memory_resource.cc: Use __constinit keyword.
865
866 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
867
868 * doc/xml/manual/abi.xml: Document 9.x library versions.
869 * doc/html/*: Regenerate.
870
871 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
872
873 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
874 (__detail::__to_chars_8_len): Remove.
875 (__detail::__to_chars_8): Inline length calculation here.
876 (__detail::__from_chars_binary): Use numeric_limits instead of
877 CHAR_BIT.
878
879 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
880
881 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
882 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
883 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
884 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
885 Likewise.
886
887 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
888
889 * testsuite_files/util/testsuite_performance.h
890 (resource_counter::start): Ignore unused malloc(0) result.
891
892 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
893
894 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
895 Model Object Technologies): Adjust name and link.
896
897 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
898
899 * include/std/charconv (__detail::__to_chars_8)
900 __detail::__to_chars_16): Replace array of precomputed digits with
901 arithmetic operations to avoid CPU cache misses. Remove zero
902 termination from array of digits to allow symbol merge with generic
903 implementation of __detail::__to_chars. Replace final offsets with
904 constants. Use __detail::__to_chars_len_2 instead of a generic
905 __detail::__to_chars_len.
906 (__detail::__to_chars): Remove zero termination from array of digits.
907 (__detail::__to_chars_2): Leading digit is always '1'.
908
909 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
910
911 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
912
913 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
914
915 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
916
917 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
918
919 PR libstdc++/89164
920 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
921 to template parameters.
922 * include/bits/stl_uninitialized.h (uninitialized_copy)
923 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
924 diagnose invalid uses.
925 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
926 Adjust expected error.
927 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
928 New test.
929 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
930 89164.cc: New test.
931 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
932 New test.
933 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
934 89164.cc: New test.
935 * testsuite/23_containers/vector/cons/89164.cc: New test.
936 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
937
938 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
939
940 PR libstdc++/91067
941 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
942 * configure: Regenerate.
943 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
944 missing symbols.
945 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
946 constructors.
947 * testsuite/util/testsuite_abi.cc: Add new symbol version.
948
949 2019-08-29 Jakub Jelinek <jakub@redhat.com>
950
951 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
952 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
953
954 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
955
956 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
957 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
958 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
959 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
960 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
961 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
962 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
963
964 2019-08-23 Joseph Myers <joseph@codesourcery.com>
965
966 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
967 (std::filesystem::__gnu_posix::lstat): Add return type.
968
969 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
970
971 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
972
973 * include/std/numeric (reduce): Fix Doxygen markup.
974
975 PR libstdc++/91371
976 * include/std/type_traits (is_function): Simplify definition. Remove
977 partial specializations for function types.
978 (__is_referenceable): Simplify definition.
979 * testsuite/20_util/bind/91371.cc: New test.
980 * testsuite/20_util/is_function/91371.cc: New test.
981 * testsuite/20_util/is_function/value.cc: Check more pointer types.
982 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
983 * testsuite/20_util/is_object/91371.cc: New test.
984
985 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
986
987 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
988
989 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
990
991 PR libstdc++/91456
992 * include/bits/std_function.h (__check_func_return_type): Remove.
993 (function::_Callable): Use std::__is_invocable_impl instead of
994 __check_func_return_type.
995 * include/std/type_traits (__is_invocable_impl): Add another defaulted
996 template parameter. Define a separate partial specialization for
997 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
998 with a check that models delayed temporary materialization.
999 * testsuite/20_util/function/91456.cc: New test.
1000 * testsuite/20_util/is_invocable/91456.cc: New test.
1001
1002 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
1003
1004 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
1005
1006 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
1007
1008 Implement C++20 p0879 - Constexpr for swap and swap related functions.
1009 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
1010 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
1011 New macro.
1012 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
1013 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
1014 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
1015 * include/bits/move.h (swap): Add constexpr.
1016 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
1017 (__gcd, __rotate, rotate, __partition, __heap_select)
1018 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
1019 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
1020 (__introselect, __chunk_insertion_sort, next_permutation)
1021 (prev_permutation, partition, partial_sort, nth_element, sort)
1022 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
1023 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
1024 (swap_ranges): Add constexpr.
1025 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
1026 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
1027 Add constexpr.
1028 * include/std/type_traits (swap): Add constexpr.
1029 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
1030 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
1031 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
1032 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
1033 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
1034 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
1035 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
1036 * testsuite/25_algorithms/partition/constexpr.cc: New test.
1037 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
1038 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
1039 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
1040 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
1041 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
1042 * testsuite/25_algorithms/sort/constexpr.cc: New test.
1043 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
1044 * testsuite/25_algorithms/swap/constexpr.cc: New test.
1045 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
1046
1047 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
1048
1049 PR libstdc++/90361
1050 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
1051
1052 * include/std/tuple (__unpack_std_tuple): New variable template and
1053 partial specializations.
1054 (apply, make_from_tuple): Add noexcept-specifier.
1055 * testsuite/20_util/tuple/apply/2.cc: New test.
1056 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
1057
1058 2019-08-09 Corentin Gay <gay@adacore.com>
1059
1060 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
1061 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
1062 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
1063 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
1064 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
1065 Add call to `VERIFY`.
1066
1067 2019-08-09 Alexandre Oliva <oliva@adacore.com>
1068
1069 * include/ext/random
1070 (normal_mv_distribution::param_type::param_type): New private
1071 ctor taking a decomposed varcov matrix, for use by...
1072 (operator>>): ... this, befriended.
1073 * include/ext/random.tcc (operator>>): Use it.
1074 (normal_mv_distribution::param_type::_M_init_lower): Adjust
1075 member function name in exception message.
1076
1077 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
1078
1079 P0325R4 to_array from LFTS with updates
1080 * include/experimental/array (to_array): Qualify call to __to_array.
1081 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
1082 * include/std/version (__cpp_lib_to_array): Likewise.
1083 * testsuite/23_containers/array/creation/1.cc: New test.
1084 * testsuite/23_containers/array/creation/2.cc: New test.
1085 * testsuite/23_containers/array/creation/3_neg.cc: New test.
1086 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
1087 Use zero for dg-error line number.
1088
1089 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
1090
1091 P1651R0 bind_front should not unwrap reference_wrapper
1092 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
1093 * include/std/version (__cpp_lib_bind_front): Update value.
1094 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
1095 feature test macro.
1096 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
1097
1098 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
1099 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
1100 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
1101 specializations for __float128.
1102 * testsuite/26_numerics/numbers/float128.cc: New test.
1103
1104 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
1105
1106 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
1107 doxygen.nl.
1108
1109 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1110
1111 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
1112 in <algorithm> and <utility> Headers.
1113 Implement C++20 p1023 - constexpr comparison operators for std::array.
1114 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
1115 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
1116 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
1117 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
1118 none_of, partition_copy, partition_point, remove, remove_if,
1119 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
1120 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
1121 count_if, equal, find, find_first_of, find_if, for_each, generate,
1122 generate_n, lexicographical_compare, merge, mismatch, replace,
1123 replace_if, search, search_n, set_difference, set_intersection,
1124 set_symmetric_difference, set_union, transform, unique_copy):
1125 Mark constexpr.
1126 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
1127 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
1128 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
1129 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
1130 Use const ref instead of ref arg;
1131 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
1132 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
1133 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
1134 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
1135 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
1136 __iter_comp_iter): Mark constexpr.
1137 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
1138 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
1139 none_of, any_of, find_if_not, is_partitioned, partition_point,
1140 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
1141 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
1142 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
1143 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
1144 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
1145 __equal_range, equal_range, binary_search, __includes, includes,
1146 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
1147 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
1148 is_sorted_until, __is_permutation, is_permutation, for_each, find,
1149 find_if, find_first_of, adjacent_find, count, count_if, search,
1150 search_n, transform, replace, replace_if, generate, generate_n,
1151 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
1152 set_intersection, __set_difference, set_difference,
1153 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
1154 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
1155 wrappers around __builtin_memmove and __builtin_memcmp
1156 respectively;
1157 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
1158 copy, move, __copy_move_b, __copy_move_backward_a,
1159 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
1160 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
1161 __lexicographical_compare_impl, __lexicographical_compare,
1162 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
1163 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
1164 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
1165 is_heap): Mark constexpr.
1166 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
1167 is_heap): Mark constexpr.
1168 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
1169 * include/std/array: Make comparison ops constexpr.
1170 * include/std/utility: Make exchange constexpr.
1171 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
1172 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
1173 * testsuite/23_containers/array/tuple_interface/
1174 tuple_element_neg.cc: Adjust.
1175 * testsuite/20_util/exchange/constexpr.cc: New.
1176 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
1177 * testsuite/25_algorithms/constexpr_macro.cc: New.
1178 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
1179 * testsuite/25_algorithms/all_of/constexpr.cc: New.
1180 * testsuite/25_algorithms/any_of/constexpr.cc: New.
1181 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
1182 * testsuite/25_algorithms/copy/constexpr.cc: New.
1183 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
1184 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
1185 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
1186 * testsuite/25_algorithms/count/constexpr.cc: New.
1187 * testsuite/25_algorithms/count_if/constexpr.cc: New.
1188 * testsuite/25_algorithms/equal/constexpr.cc: New.
1189 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
1190 * testsuite/25_algorithms/fill/constexpr.cc: New.
1191 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
1192 * testsuite/25_algorithms/find/constexpr.cc: New.
1193 * testsuite/25_algorithms/find_end/constexpr.cc: New.
1194 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
1195 * testsuite/25_algorithms/find_if/constexpr.cc: New.
1196 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
1197 * testsuite/25_algorithms/for_each/constexpr.cc: New.
1198 * testsuite/25_algorithms/generate/constexpr.cc: New.
1199 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
1200 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
1201 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
1202 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
1203 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
1204 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
1205 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
1206 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
1207 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
1208 * testsuite/25_algorithms/merge/constexpr.cc: New.
1209 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
1210 * testsuite/25_algorithms/none_of/constexpr.cc: New.
1211 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
1212 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
1213 * testsuite/25_algorithms/remove/constexpr.cc: New.
1214 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
1215 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
1216 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
1217 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
1218 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
1219 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
1220 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
1221 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
1222 * testsuite/25_algorithms/search/constexpr.cc: New.
1223 * testsuite/25_algorithms/search_n/constexpr.cc: New.
1224 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
1225 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
1226 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
1227 * testsuite/25_algorithms/set_union/constexpr.cc: New.
1228 * testsuite/25_algorithms/transform/constexpr.cc: New.
1229 * testsuite/25_algorithms/unique/constexpr.cc: New.
1230 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
1231 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
1232
1233 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
1234
1235 * include/std/memory (make_obj_using_allocator): Qualify call to
1236 uses_allocator_construction_args.
1237
1238 P0631R4 Math Constants
1239 * include/Makefile.am: Add new header.
1240 * include/Makefile.in: Regenerate.
1241 * include/precompiled/stdc++.h: Include new header.
1242 * include/std/numbers: New header.
1243 * include/std/version (__cpp_lib_math_constants): Define.
1244 * testsuite/26_numerics/numbers/1.cc: New test.
1245 * testsuite/26_numerics/numbers/2.cc: New test.
1246 * testsuite/26_numerics/numbers/3.cc: New test.
1247 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
1248
1249 * include/std/bit: Add Doxygen comments.
1250
1251 PR libstdc++/91308
1252 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
1253 constraints on deleter that should only apply to the constructor.
1254 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
1255 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
1256 constraints on deleter here.
1257 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
1258
1259 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
1260
1261 PR libstdc++/51333
1262 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
1263 constructor inline.
1264 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
1265 constructor.
1266 * testsuite/18_support/51333.cc: New test.
1267
1268 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
1269
1270 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
1271 to the Doxygen manual. Avoid a "here" link on the way.
1272 Fix another broken link to Doxygen docblocks.
1273
1274 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
1275
1276 * include/std/bit (__cpp_lib_endian): Define.
1277 * include/std/version (__cpp_lib_endian): Define.
1278 * testsuite/26_numerics/endian/2.cc: New.
1279 * testsuite/26_numerics/endian/3.cc: New.
1280 * testsuite/26_numerics/endian/4.cc: New.
1281
1282 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
1283
1284 * testsuite/util/testsuite_iterators.h
1285 (bidirectional_iterator_wrapper): Fix type comment.
1286 (random_access_iterator_wrapper): Likewise.
1287
1288 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
1289
1290 * include/std/bit (endian): Move definition here as per P1612R1.
1291 * include/std/type_traits (endian): Remove definition from here.
1292 * testsuite/20_util/endian/1.cc: Rename to ...
1293 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
1294
1295 2019-07-25 Martin Liska <mliska@suse.cz>
1296 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1297
1298 PR c++/23383
1299 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
1300 -fno-allocation-dce.
1301 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
1302 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
1303 * testsuite/ext/new_allocator/check_new.cc: Likewise.
1304
1305 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
1306
1307 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
1308 * testsuite/26_numerics/bit/bit.count/*: Here.
1309
1310 * include/std/bit (__rotl, __rotr): Change second parameter from
1311 unsigned int to int and handle negative values.
1312 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
1313 parameter from unsigned int to int. Add nodiscard attribute.
1314 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
1315 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
1316 shifts.
1317 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
1318 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
1319 shifts.
1320
1321 * include/std/bit (__ceil2): Make unrepresentable results undefined,
1322 as per P1355R2. Add debug assertion. Perform one left shift, not two,
1323 so that out of range values cause undefined behaviour. Ensure that
1324 shift will still be undefined if left operand is promoted.
1325 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
1326 unrepresentable values with checks that they are not core constant
1327 expressions.
1328 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
1329
1330 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
1331
1332 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
1333 sized deallocation size computation.
1334
1335 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
1336
1337 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
1338
1339 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
1340
1341 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
1342 (~_Temporary_buffer()): Use latter.
1343 (_Temporary_buffer(_FIterator, size_type)): Likewise.
1344
1345 2019-07-17 Andreas Schwab <schwab@suse.de>
1346
1347 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1348
1349 2019-07-16 Jason Merrill <jason@redhat.com>
1350
1351 * include/std/memory (uses_allocator_construction_args): Add parens
1352 around constraint.
1353
1354 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
1355
1356 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
1357
1358 * include/experimental/string_view (__detail::__idt): Remove.
1359 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1360 Use __type_identity_t instead of __detail::__idt;
1361 * include/std/string_view (__detail::__idt): Remove.
1362 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1363 Use __type_identity_t instead of __detail::__idt;
1364 * include/std/type_traits (__type_identity_t): New alias template.
1365
1366 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
1367 and floating point atomics.
1368
1369 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
1370
1371 * doc/xml/manual/configure.xml: Improve documentation of
1372 --enable-libstdcxx-time option.
1373
1374 * include/bits/atomic_base.h (__atomic_impl): New namespace for
1375 wrappers around atomic built-ins.
1376 (__atomic_float, __atomic_ref): New class templates for use as base
1377 classes.
1378 * include/std/atomic (atomic<float>, atomic<double>)
1379 (atomic<long double>): New explicit specializations.
1380 (atomic_ref): New class template.
1381 (__cpp_lib_atomic_ref): Define.
1382 * include/std/version (__cpp_lib_atomic_ref): Define.
1383 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
1384 * testsuite/29_atomics/atomic_float/1.cc: New test.
1385 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
1386 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
1387 * testsuite/29_atomics/atomic_ref/float.cc: New test.
1388 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
1389 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
1390 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
1391 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
1392
1393 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
1394
1395 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
1396 throw() with _GLIBCXX_NOTHROW.
1397 (__atomic_add_dispatch): Return after performing atomic increment.
1398
1399 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
1400
1401 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
1402 (__exchange_and_add): Replace static specifier with always_inline
1403 attribute.
1404 (__exchange_and_add_single, __atomic_add_single): Likewise.
1405 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
1406 combine !__gthread_active_p() and !__GTHREADS branches.
1407
1408 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
1409
1410 PR libstdc++/91067
1411 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
1412 * configure: Regenerate.
1413 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
1414 missing symbols.
1415 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
1416 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1417
1418 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
1419
1420 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
1421 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
1422 instead of __is_identifier to detect Clang support.
1423
1424 2019-07-02 Jim Wilson <jimw@sifive.com>
1425
1426 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
1427 and xmllint.
1428 * configure: Regenerate.
1429
1430 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
1431
1432 PR libstdc++/91012
1433 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
1434 for the what_arg parameters.
1435 (filesystem_error::filesystem_error): Pass system_error::what() to
1436 the _Impl constructor.
1437 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
1438 filesystem_error::what() contains system_error::what().
1439
1440 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
1441
1442 * include/std/charconv (chars_format): Define bitmask type.
1443 * testsuite/20_util/to_chars/chars_format.cc: New test.
1444
1445 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
1446 * include/std/bit (_If_is_unsigned_integer_type): Remove.
1447 (_If_is_unsigned_integer): Use __is_unsigned_integer.
1448 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
1449 (countl_one(byte), countr_zero(byte), countr_one(byte))
1450 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
1451 (log2p1(byte)): Remove.
1452 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
1453 (__detail::__is_int_to_chars_type): Remove.
1454 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
1455 and __is_unsigned_integer.
1456 * include/std/type_traits (__is_one_of): Move here from <charconv>.
1457 (__is_signed_integer, __is_unsigned_integer): New helpers.
1458 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
1459 std::byte overload.
1460 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
1461 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
1462 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
1463 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
1464 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
1465 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
1466 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
1467 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
1468 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
1469 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
1470
1471 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
1472
1473 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
1474 function.
1475
1476 2019-06-25 Jakub Jelinek <jakub@redhat.com>
1477
1478 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
1479 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
1480 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
1481 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
1482
1483 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
1484
1485 * include/std/numeric (midpoint(T, T)): Change implementation for
1486 floating-point types to avoid incorrect rounding of denormals.
1487 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
1488 rounding with denormals.
1489 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
1490 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1491
1492 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
1493
1494 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
1495
1496 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
1497 stage of bootstrap.
1498 * configure: Regenerate.
1499
1500 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
1501 Qualify calls to __never_valueless.
1502
1503 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
1504 C++17 working draft.
1505
1506 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
1507 vector<bool> for test.
1508 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1509
1510 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1511
1512 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
1513 private.
1514 (istream_iterator::_M_read()): Do not check stream state before
1515 attempting extraction. Set stream pointer to null when extraction
1516 fails (P0738R2).
1517 (operator==(const istream_iterator&, const istream_iterator&)): Change
1518 to be a hidden friend of istream_iterator.
1519 (operator!=(const istream_iterator&, const istream_iterator&)):
1520 Likewise.
1521 (ostream_iterator::ostream_iterator()): Add default constructor.
1522 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
1523 addressof.
1524 * testsuite/24_iterators/istream_iterator/1.cc: New test.
1525 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
1526 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
1527 constructor taking a string.
1528 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
1529 New test.
1530
1531 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
1532 Jonathan Wakely <jwakely@redhat.com>
1533
1534 PR libstdc++/90945
1535 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
1536 values of type bool for vector<bool> elements.
1537 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
1538 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1539
1540 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1541
1542 PR libstdc++/90920 partially revert r263433
1543 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
1544 (rotate): Remove checks.
1545 * testsuite/25_algorithms/rotate/90920.cc: New test.
1546
1547 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
1548 category used in invocable check.
1549 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
1550 * testsuite/26_numerics/reduce/2.cc: New test.
1551
1552 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
1553
1554 * include/bits/algorithmfwd.h: Change title of doc group.
1555 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
1556 P0024R2.
1557 * include/bits/stl_numeric.h: Define doc group and add algos to it.
1558 * include/std/numeric (__is_random_access_iter): New internal trait.
1559 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
1560 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
1561 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
1562 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
1563 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
1564 * testsuite/26_numerics/reduce/1.cc: New test.
1565 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
1566 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
1567 * testsuite/26_numerics/transform_reduce/1.cc: New test.
1568 * testsuite/util/testsuite_iterators.h (test_container::size()): New
1569 member function.
1570
1571 * include/c_global/cstddef (std::byte): Perform arithmetic operations
1572 in unsigned int to avoid promotion (LWG 2950).
1573
1574 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1575
1576 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
1577 failure on AIX.
1578
1579 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
1580
1581 PR libstdc++/90281 Fix string conversions for filesystem::path
1582 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1583 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
1584 __str_codecvt_in_all to fail for partial conversions and throw on
1585 error.
1586 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
1587 (path::_Cvt<char8_t>): Add explicit specialization.
1588 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
1589 overloads.
1590 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1591 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
1592 instead of codecvt_utf8. Use __str_codecvt_in_all and
1593 __str_codecvt_out_all.
1594 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1595 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1596 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1597 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1598 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
1599 after converting to UTF-8.
1600 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
1601 __str_codecvt_in_all.
1602 (path::string): Fix initialization of string types with different
1603 allocators.
1604 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1605 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1606 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
1607 runtime conditions.
1608 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
1609 return false for partial conversions.
1610 * include/experimental/bits/fs_path.h (u8path):
1611 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
1612 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
1613 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
1614 instead of codecvt_utf8. Use __str_codecvt_in_all and
1615 __str_codecvt_out_all.
1616 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1617 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1618 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1619 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1620 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
1621 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1622 __str_codecvt_in_all.
1623 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1624 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1625 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
1626 __str_codecvt_in_all.
1627 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
1628 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
1629 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
1630 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
1631 strings and with Unicode characters outside the basic multilingual
1632 plane.
1633 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
1634 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
1635 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
1636 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
1637 * testsuite/experimental/filesystem/path/native/string.cc: Test with
1638 empty strings and with Unicode characters outside the basic
1639 multilingual plane.
1640
1641 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
1642 Jonathan Wakely <jwakely@redhat.com>
1643
1644 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
1645 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
1646 deallocate node if insertion fails.
1647 (_Hashtable::_M_insert_multi_node): Likewise.
1648 (_Hashtable::_M_reinsert_node): Pass additional key argument.
1649 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
1650 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
1651 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
1652 (_Hashtable::extract(const _Key&)): Likewise.
1653 (_Hashtable::_M_merge_unique): Pass additional key argument.
1654 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
1655 _Scoped_node.
1656 (_Hashtable::_M_insert): Likewise.
1657 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
1658 (_Hashtable_alloc): Add comments to functions with misleading names.
1659
1660 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1661
1662 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
1663 for std::string.
1664 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
1665 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
1666 header for std::allocator.
1667 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
1668 using-declaration for std::size_t.
1669 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
1670 Likewise.
1671 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
1672 std::istream.
1673 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
1674 * testsuite/experimental/map/erasure.cc: Include <string> for
1675 std::string.
1676 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
1677
1678 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
1679
1680 * include/experimental/type_traits (experimental::nonesuch): Use
1681 pragma to disable -Wctor-dtor-privacy warnings.
1682 * include/std/type_traits (__is_convertible_helper<From, To, false>)
1683 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
1684
1685 * include/std/version (__cpp_lib_bind_front): Add missing macro.
1686
1687 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
1688
1689 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
1690 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
1691 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
1692 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
1693
1694 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
1695 (variant::emplace): Change static_assert messages from "should be"
1696 to "must be".
1697 (hash<monostate>::operator()): Remove name of unused parameter.
1698
1699 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
1700 expression.
1701
1702 * include/Makefile.am: Add new <bits/charconv.h> header.
1703 * include/Makefile.in: Regenerate.
1704 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
1705 (to_string(long), to_string(unsigned long), to_string(long long))
1706 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
1707 * include/bits/charconv.h: New header.
1708 (__detail::__to_chars_len): Move here from <charconv>.
1709 (__detail::__to_chars_10_impl): New function extracted from
1710 __detail::__to_chars_10.
1711 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
1712 (__to_chars_unsigned_type): New class template that reuses
1713 __make_unsigned_selector_base::__select to pick a type.
1714 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
1715 (__detail::__to_chars_len): Move to new header.
1716 (__detail::__to_chars_10): Add inline specifier. Move code doing the
1717 output to __detail::__to_chars_10_impl and call that.
1718 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
1719 * testsuite/21_strings/basic_string/numeric_conversions/char/
1720 to_string.cc: Fix reference in comment. Remove unused variable.
1721 * testsuite/21_strings/basic_string/numeric_conversions/char/
1722 to_string_int.cc: New test.
1723
1724 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1725
1726 Fix ConstexprIterator requirements tests - No constexpr algorithms!
1727 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1728 Replace copy with hand-rolled loop.
1729 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1730 Ditto.
1731
1732 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
1733
1734 Test for C++20 p0858 - ConstexprIterator requirements.
1735 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1736 New test.
1737 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1738 New test.
1739
1740 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
1741
1742 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
1743 project) standards.
1744 * include/bits/c++config: Rename all macros of the form __PSTL* to
1745 _PSTL*.
1746 * include/std/algorithm: Likewise.
1747 * include/std/execution: Likewise.
1748 * include/std/numeric: Likewise.
1749 * include/std/memory: Likewise.
1750 * include/pstl/glue_memory_impl.h: Likewise.
1751 * include/pstl/numeric_impl.h: Likewise.
1752 * include/pstl/glue_memory_defs.h: Likewise.
1753 * include/pstl/execution_defs.h: Likewise.
1754 * include/pstl/utils.h: Likewise.
1755 * include/pstl/algorithm_fwd.h: Likewise.
1756 * include/pstl/unseq_backend_simd.h: Likewise.
1757 * include/pstl/glue_execution_defs.h: Likewise.
1758 * include/pstl/algorithm_impl.h: Likewise.
1759 * include/pstl/parallel_impl.h: Likewise.
1760 * include/pstl/memory_impl.h: Likewise.
1761 * include/pstl/glue_numeric_defs.h: Likewise.
1762 * include/pstl/parallel_backend_utils.h: Likewise.
1763 * include/pstl/glue_algorithm_defs.h: Likewise.
1764 * include/pstl/parallel_backend.h: Likewise.
1765 * include/pstl/glue_numeric_impl.h: Likewise.
1766 * include/pstl/parallel_backend_tbb.h: Likewise.
1767 * include/pstl/numeric_fwd.h: Likewise.
1768 * include/pstl/glue_algorithm_impl.h: Likewise.
1769 * include/pstl/execution_impl.h: Likewise.
1770 * include/pstl/pstl_config.h: Likewise.
1771 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1772 * testsuite/util/pstl/test_utils.h: Likewise.
1773 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
1774 Likewise.
1775 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
1776 Likewise.
1777 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
1778 Likewise.
1779 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
1780 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
1781 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
1782 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
1783 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
1784 Likewise.
1785 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
1786 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
1787 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
1788 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
1789 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
1790 Likewise.
1791 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
1792 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
1793 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
1794 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
1795 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
1796 Likewise.
1797 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
1798 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
1799 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
1800 Likewise.
1801 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
1802 Likewise.
1803 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
1804 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
1805 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
1806 Likewise.
1807 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
1808 Likewise.
1809 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
1810 Likewise.
1811 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
1812 Likewise.
1813 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
1814 Likewise.
1815 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
1816 Likewise.
1817 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
1818 Likewise.
1819 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
1820 Likewise.
1821 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
1822 Likewise.
1823 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
1824 Likewise.
1825 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
1826 Likewise.
1827 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
1828
1829 Rename header guards to be consistent with upstream project's
1830 conventions.
1831 * include/pstl/glue_memory_impl.h: Rename all macros of the form
1832 _PSTL_(.*)_H to _PSTL_\U\1_H.
1833 * include/pstl/numeric_impl.h: Likewise.
1834 * include/pstl/glue_memory_defs.h: Likewise.
1835 * include/pstl/execution_defs.h: Likewise.
1836 * include/pstl/utils.h: Likewise.
1837 * include/pstl/algorithm_fwd.h: Likewise.
1838 * include/pstl/unseq_backend_simd.h: Likewise.
1839 * include/pstl/glue_execution_defs.h: Likewise.
1840 * include/pstl/algorithm_impl.h: Likewise.
1841 * include/pstl/parallel_impl.h: Likewise.
1842 * include/pstl/memory_impl.h: Likewise.
1843 * include/pstl/glue_numeric_defs.h: Likewise.
1844 * include/pstl/parallel_backend_utils.h: Likewise.
1845 * include/pstl/glue_algorithm_defs.h: Likewise.
1846 * include/pstl/parallel_backend.h: Likewise.
1847 * include/pstl/glue_numeric_impl.h: Likewise.
1848 * include/pstl/parallel_backend_tbb.h: Likewise.
1849 * include/pstl/numeric_fwd.h: Likewise.
1850 * include/pstl/glue_algorithm_impl.h: Likewise.
1851 * include/pstl/execution_impl.h: Likewise.
1852 * include/pstl/pstl_config.h: Likewise.
1853 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1854
1855 Synchronize libstdc++ parallel algorithms with upstream
1856 project.
1857 * include/pstl/algorithm_fwd.h: Synchronize with
1858 upstream PSTL project.
1859 * include/pstl/algorithm_impl.h: Likewise.
1860 * include/pstl/execution_defs.h: Likewise.
1861 * include/pstl/execution_impl.h: Likewise.
1862 * include/pstl/glue_algorithm_impl.h: Likewise.
1863 * include/pstl/glue_execution_defs.h: Likewise.
1864 * include/pstl/numeric_fwd.h: Likewise.
1865 * include/pstl/numeric_impl.h: Likewise.
1866 * include/pstl/parallel_backend.h: Likewise.
1867 * include/pstl/pstl_config.h: Likewise.
1868 * include/pstl/unseq_backend_simd.h: Likewise.
1869 * include/pstl/parallel_backend_serial.h: New file.
1870 * include/Makefile.am (pstl_headers): Add
1871 parallel_backend_serial.h.
1872 * include/Makefile.in: Regenerate.
1873
1874 Clean up non-conforming names
1875 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1876 Uglfiy copy_range1 and copy_range2
1877 (__pattern_walk2_n): Rename local n to __n
1878 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1879 Rename parameter _T to _Tp.
1880
1881 Integrate non-TBB serial backend support
1882 * include/bits/c++config: Adjust TBB detection logic to select serial
1883 PSTL backend if no TBB present.
1884 * testsuite/utils/pstl/test_utils.h: Remove check for
1885 _PSTL_USE_PAR_POLICIES
1886
1887 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1888
1889 * testsuite/24_iterators/container_access.cc: Move dg-options before
1890 dg-do directive so the target check uses the -std option.
1891
1892 PR libstdc++/90770
1893 * configure: Regenerate.
1894 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1895 * src/Makefile.in: Regenerate.
1896
1897 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1898
1899 * include/std/array: Do not include <stdexcept>.
1900 * include/std/optional: Include <exception> and
1901 <bits/exception_defines.h> instead of <stdexcept>.
1902 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1903 for std::isalnum.
1904 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1905 std::allocator.
1906 * testsuite/23_containers/map/erasure.cc: Include <string>.
1907 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1908
1909 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1910 dg-prune-output for different C++98 diagnostic.
1911 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1912 Likewise.
1913 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1914 Likewise.
1915 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1916 Likewise.
1917 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1918 Likewise.
1919 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1920 Likewise.
1921 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1922 Likewise.
1923 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1924 Likewise.
1925 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1926 Likewise.
1927 * testsuite/23_containers/vector/requirements/dr438/
1928 constructor_1_neg.cc: Likewise.
1929 * testsuite/23_containers/vector/requirements/dr438/
1930 constructor_2_neg.cc: Likewise.
1931 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1932 Likewise.
1933 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1934
1935 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1936 Do not test allocator rebinding extension for C++2a.
1937 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1938 dg-do directive for C++17 and C++2a.
1939
1940 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1941 1_c++0x.cc: Remove redundant test.
1942 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1943 2.cc: Use target selector instead of preprocessor condition.
1944 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1945 3.cc: Do not run test for C++2a.
1946 * testsuite/23_containers/forward_list/requirements/
1947 explicit_instantiation/3.cc: Likewise.
1948 * testsuite/23_containers/forward_list/requirements/
1949 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1950 for C++2a.
1951 * testsuite/23_containers/list/requirements/explicit_instantiation/
1952 1_c++0x.cc: Remove redundant test.
1953 * testsuite/23_containers/list/requirements/explicit_instantiation/
1954 2.cc: Use target selector instead of preprocessor condition.
1955 * testsuite/23_containers/list/requirements/explicit_instantiation/
1956 3.cc: Do not run test for C++2a.
1957 * testsuite/23_containers/list/requirements/explicit_instantiation/
1958 5.cc: Do not test allocator rebinding extension for C++2a.
1959 * testsuite/23_containers/map/requirements/explicit_instantiation/
1960 1_c++0x.cc: Remove redundant test.
1961 * testsuite/23_containers/map/requirements/explicit_instantiation/
1962 2.cc: Adjust comment.
1963 * testsuite/23_containers/map/requirements/explicit_instantiation/
1964 3.cc: Do not run test for C++2a.
1965 * testsuite/23_containers/map/requirements/explicit_instantiation/
1966 5.cc: Do not test allocator rebinding extension for C++2a.
1967 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1968 1_c++0x.cc: Remove redundant test.
1969 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1970 3.cc: Do not run test for C++2a.
1971 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1972 5.cc: Do not test allocator rebinding extension for C++2a.
1973 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1974 3.cc: Do not run test for C++2a.
1975 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1976 5.cc: Do not test allocator rebinding extension for C++2a.
1977 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1978 Do not run test for C++2a.
1979 * testsuite/23_containers/set/requirements/explicit_instantiation/
1980 1_c++0x.cc: Remove redundant test.
1981 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1982 Do not test allocator rebinding extension for C++2a.
1983 * testsuite/23_containers/unordered_map/requirements/
1984 explicit_instantiation/3.cc: Likewise.
1985 * testsuite/23_containers/unordered_map/requirements/
1986 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1987 for C++2a.
1988 * testsuite/23_containers/unordered_multimap/requirements/
1989 explicit_instantiation/3.cc: Do not run test for C++2a.
1990 * testsuite/23_containers/unordered_multimap/requirements/
1991 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1992 for C++2a.
1993 * testsuite/23_containers/unordered_multiset/requirements/
1994 explicit_instantiation/3.cc: Do not run test for C++2a.
1995 * testsuite/23_containers/unordered_multiset/requirements/
1996 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1997 for C++2a.
1998 * testsuite/23_containers/unordered_set/requirements/
1999 explicit_instantiation/3.cc: Do not run test for C++2a.
2000 * testsuite/23_containers/unordered_set/requirements/
2001 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2002 for C++2a.
2003 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2004 2.cc: Remove redundant test.
2005 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2006 3.cc: Do not run test for C++2a.
2007 * testsuite/23_containers/vector/requirements/explicit_instantiation/
2008 3.cc: Likewise.
2009
2010 * include/std/type_traits (is_empty, is_polymorphic, is_final)
2011 (is_abstract, is_aggregate): Remove static_assert.
2012 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
2013 from builtin only.
2014 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
2015 missing -std=gnu++17 option.
2016 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
2017 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
2018 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
2019 from builtin only.
2020
2021 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
2022 * testsuite/18_support/set_unexpected.cc: Likewise.
2023 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
2024 void.
2025 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
2026 function to be valid in C++11.
2027 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
2028 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
2029 include Library Fundamentals or Networking headers in C++11 mode.
2030 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
2031
2032 * include/std/tuple (_TC): Replace with _TupleConstraints.
2033 (_TupleConstraints): New helper for SFINAE constraints, with more
2034 expressive member functions to reduce duplication when used.
2035 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
2036 (tuple::_TCC): Replace dummy type parameter with bool non-type
2037 parameter that can be used to check the pack size.
2038 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
2039 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
2040 checking constraints in constructors.
2041 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
2042 New SFINAE helpers.
2043 (tuple::tuple): Use new helpers to reduce repitition in constraints.
2044 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
2045 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
2046 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
2047 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
2048 constraints in constructors.
2049 (tuple::__is_alloc_arg()): New SFINAE helpers.
2050 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
2051 constraints.
2052 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
2053 * testsuite/20_util/tuple/cons/90700.cc: New test.
2054 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
2055 to meet new constraint on allocator-extended default constructor.
2056
2057 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2058
2059 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
2060 * include/bits/stl_multimap.h (multimap): Likewise.
2061
2062 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
2063
2064 Rename variables and cleanup comments.
2065 * include/bits/hashtable_policy.h
2066 * include/bits/hashtable.h
2067
2068 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2069
2070 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
2071 Fix bgcolor for P0340R3.
2072 * doc/html/*: Regenerate.
2073
2074 PR libstdc++/90686
2075 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
2076 <experimental/memory_resource>.
2077 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
2078 P0339R6, P0340R3, P1164R1 and P1357R1.
2079 * doc/html/*: Regenerate.
2080
2081 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
2082 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
2083 allocator::value_type assertion for C++2a.
2084 * include/bits/hashtable.h: Likewise.
2085 * include/bits/stl_deque.h: Likewise.
2086 * include/bits/stl_list.h: Likewise.
2087 * include/bits/stl_map.h: Likewise.
2088 * include/bits/stl_multimap.h: Likewise.
2089 * include/bits/stl_multiset.h: Likewise.
2090 * include/bits/stl_set.h: Likewise.
2091 * include/bits/stl_vector.h: Likewise.
2092 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
2093 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
2094 * testsuite/23_containers/list/48101-3_neg.cc: New test.
2095 * testsuite/23_containers/map/48101-3_neg.cc: New test.
2096 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
2097 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
2098 * testsuite/23_containers/set/48101-3_neg.cc: New test.
2099 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
2100 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
2101 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
2102 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
2103 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
2104
2105 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
2106
2107 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
2108
2109 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2110
2111 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
2112 constructors.
2113 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
2114 function.
2115 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
2116
2117 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2118
2119 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
2120
2121 PR libstdc++/90682
2122 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
2123 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
2124 * libsupc++/eh_term_handler.h: New header defining
2125 _GLIBCXX_DEFAULT_TERM_HANDLER.
2126 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
2127 (set_terminate): Restore default handler when argument is null.
2128 (set_unexpected): Likewise.
2129 * testsuite/18_support/set_terminate.cc: New test.
2130 * testsuite/18_support/set_unexpected.cc: New test.
2131
2132 * include/backward/hashtable.h (size_t, ptrdiff_t)
2133 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
2134 (distance, vector, pair, __iterator_category): Remove
2135 using-declarations that add these names to namespace __gnu_cxx.
2136 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
2137 * include/ext/debug_allocator.h (size_t): Likewise.
2138 * include/ext/functional (size_t, unary_function, binary_function)
2139 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
2140 Likewise.
2141 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
2142 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
2143 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
2144 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
2145 * include/ext/numeric (iota): Fix outdated comment.
2146 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
2147 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
2148 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
2149 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
2150 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
2151 Likewise.
2152 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
2153 (allocator, __true_type, __false_type): Likewise.
2154
2155 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
2156
2157 PR libstdc++/71579
2158 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
2159 New helpers for checking preconditions in traits.
2160 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
2161 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
2162 (is_destructible, is_nothrow_destructible, is_constructible)
2163 (is_default_constructible, is_copy_constructible)
2164 (is_move_constructible, is_nothrow_default_constructible)
2165 (is_nothrow_constructible, is_nothrow_copy_constructible)
2166 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
2167 (is_nothrow_assignable, is_nothrow_copy_assignable)
2168 (is_nothrow_move_assignable, is_trivially_constructible)
2169 (is_trivially_copy_constructible, is_trivially_move_constructible)
2170 is_trivially_assignable, is_trivially_copy_assignable)
2171 (is_trivially_move_assignable, is_trivially_destructible)
2172 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
2173 (is_invocable_r, is_nothrow_invocable)
2174 (has_unique_object_representations, is_aggregate): Add static_asserts
2175 to make sure that type traits are not misused with incomplete types.
2176 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
2177 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
2178 base characteristics without assertions that can be reused in other
2179 traits.
2180 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
2181 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
2182 test.
2183 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
2184 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
2185 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
2186 * testsuite/20_util/is_class/value.cc: Check incomplete type.
2187 * testsuite/20_util/is_function/value.cc: Likewise.
2188 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
2189 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
2190 test.
2191 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
2192 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
2193 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2194 * testsuite/20_util/is_union/value.cc: Likewise.
2195 * testsuite/20_util/is_void/value.cc: Likewise.
2196 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
2197
2198 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2199
2200 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
2201 Add new private member function.
2202 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
2203 (random_device::_M_init_pretr1(const string&)): Call new private
2204 member with string data.
2205 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
2206 Define.
2207 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
2208 test using COW strings.
2209 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
2210 a value from the device.
2211 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
2212 Fix typo in token string.
2213
2214 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
2215
2216 LWG2788 basic_string spurious use of a default constructible allocator
2217 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
2218 (basic_string::_M_replace_dispatch): Construct temporary string with
2219 the current allocator.
2220 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
2221 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
2222
2223 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
2224
2225 * doc/xml/manual/diagnostics.xml: Update list of headers that define
2226 exception classes.
2227 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
2228 section about new/delete overloads. Improve section on verbose
2229 terminate handler.
2230 * doc/html/*: Regenerate.
2231
2232 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
2233 P0811R3. Change status of P1353R0.
2234 * doc/html/*: Regenerate.
2235
2236 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
2237 documentation of implementation-defined types for [thread.req.native].
2238 * doc/xml/manual/status_cxx2017.xml: Update documentation of
2239 implementation-defined strings for [variant.bad.access]. Fix typo in
2240 documentation of implementation-defined support for [fs.conform.9945].
2241 * doc/html/*: Regenerate.
2242
2243 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
2244
2245 PR libstdc++/85494
2246 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
2247 that fails on mingw-w64.
2248
2249 PR libstdc++/88881
2250 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2251 (status(const path&, error_code&)): Use parent_path() to remove
2252 trailing slash.
2253 (symlink_status(const path&, error_code&)): Duplicate workaround for
2254 bug in _wstat for paths with trailing slash.
2255 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
2256 with trailing slash.
2257 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2258 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2259
2260 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
2261 once instead of building it iteratively.
2262
2263 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
2264
2265 PR libstdc++/85494 use rdseed and rand_s in std::random_device
2266 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
2267 the assembler supports rdseed.
2268 * config.h.in: Regenerate.
2269 * configure: Regenerate.
2270 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
2271 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
2272 * doc/html/*: Regenerate.
2273 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
2274 * include/bits/random.h (random_device::random_device()): Always call
2275 _M_init rather than _M_init_pretr1.
2276 (random_device::random_device(const string&)): Likewise.
2277 (random_device::operator()()): Always call _M_getval().
2278 (random_device::_M_file): Replace first member of union with an
2279 anonymous struct, with _M_file as its first member.
2280 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
2281 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
2282 (USE_MT19937): Define if none of the above are defined.
2283 (USE_POSIX_FILE_IO): Define.
2284 (_M_strtoul): Remove.
2285 [USE_RDSEED] (__x86_rdseed): Define new function.
2286 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
2287 (random_device::_M_init(const string&)): Initialize new union members.
2288 Add support for "rdseed" and "rand_s" tokens. Decide what the
2289 "default" token does according to which USE_* macros are defined.
2290 [USE_POSIX_FILE_IO]: Store a file descriptor.
2291 [USE_MT19937]: Forward to _M_init_pretr1 instead.
2292 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
2293 code from _M_strtoul.
2294 [!USE_MT19937]: Call _M_init, transforming the old default token or
2295 numeric tokens to "default".
2296 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
2297 (random_device::_M_getval()): Use new union members to obtain a
2298 random number from the stored function pointer or file descriptor.
2299 [USE_MT19937]: Obtain a value from the mt19937 engine.
2300 (random_device::_M_getval_pretr1()): Call _M_getval().
2301 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
2302 instead of fileno.
2303 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
2304 * testsuite/26_numerics/random/random_device/85494.cc: New test.
2305
2306 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
2307
2308 PR libstdc++/90634
2309 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
2310 _M_split_cmpts() for a path with multiple components.
2311 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
2312 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
2313 components and reserve space in vector. Return early when there is
2314 only one component.
2315 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
2316 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
2317
2318 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
2319 form of std::equals for C++11 compatibility.
2320
2321 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
2322
2323 * doc/xml/manual/appendix_contributing.xml: Update pointer to
2324 C++ standard at ansi.org.
2325
2326 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
2327
2328 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
2329 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
2330 to "run".
2331
2332 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
2333 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
2334
2335 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2336
2337 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
2338 tests to ...
2339 * testsuite/20_util/function_objects/invoke/3.cc: New test.
2340 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2341 "compile" test to "run".
2342
2343 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
2344 * doc/html/*: Regenerate.
2345 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
2346 rvalue aliasing constructor.
2347 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
2348 (reinterpret_pointer_cast): Add overloads taking rvalues.
2349 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
2350 Add rvalue aliasing constructor.
2351 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
2352 "run" and check return values as well as types.
2353 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
2354 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
2355 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
2356 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
2357 values.
2358
2359 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
2360 * doc/xml/manual/intro.xml: Likewise.
2361 * include/std/future (__create_task_state): Add default arguments
2362 to make providing an allocator optional.
2363 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
2364 instead of delegating to another constructor.
2365 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
2366 define allocator-extended constructors for C++17 and later.
2367 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
2368 C++11 and C++14.
2369 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
2370 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
2371 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
2372
2373 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
2374
2375 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
2376 Don't run the libstdc++/83237 part on simulator targets.
2377
2378 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2379
2380 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
2381 P0040R3.
2382 * doc/html/*: Regenerate.
2383
2384 * include/experimental/any (__any_caster): Use RTTI if comparing
2385 addresses fails, to support non-unique addresses in shared libraries.
2386 * include/std/any (__any_caster): Likewise.
2387
2388 PR libstdc++/90220
2389 * include/experimental/any (__any_caster): Constrain to only be
2390 callable for object types. Use remove_cv_t instead of decay_t.
2391 If the type decays or isn't copy constructible, compare the manager
2392 function to a dummy specialization.
2393 (__any_caster): Add overload constrained for non-object types.
2394 (any::_Manager_internal<_Op>): Add dummy specialization.
2395 * testsuite/experimental/any/misc/any_cast.cc: Test function types
2396 and array types.
2397
2398 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
2399
2400 PR libstdc++/90557
2401 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
2402 reversed arguments to uninitialized_copy_n.
2403 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
2404 is unchanged by copy assignment.
2405 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
2406 compare path components.
2407
2408 PR libstdc++/77691
2409 * include/experimental/memory_resource: Add system header pragma and
2410 do not define anything unless compiled as C++14 or later.
2411 (__resource_adaptor_common::__guaranteed_alignment): Remove.
2412 (__resource_adaptor_imp::do_allocate): If the requested alignment
2413 is a fundamental alignment then either allocate directly from _M_alloc
2414 or call the new _M_allocate function.
2415 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
2416 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
2417 of the allocator rebound to a POD type with the specified alignment.
2418 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
2419 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2420 Adjust expected allocation sizes.
2421 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
2422 xfail for Solaris x86.
2423
2424 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
2425
2426 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
2427 * include/pstl/execution_defs.h (__enable_if_execution_policy):
2428 Use std::__remove_cvref_t when building with GCC.
2429
2430 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
2431
2432 PR libstdc++/90252
2433 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2434 Use "additional_flags" to pass -ltbb to v3_target_compile command.
2435 Use check_v3_target_prop_cached to cache the result of the test.
2436
2437 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
2438
2439 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2440
2441 PR libstdc++/90252
2442 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2443 Changed v3_target_compile check from preprocess to executable.
2444 Added "-ltbb" to v3_target_compile flags.
2445
2446 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2447
2448 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2449 Add check for Thread Building Blocks 2018 or later.
2450
2451 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2452
2453 * testsuite/experimental/names.cc: Only include Networking TS headers
2454 on targets with the necessary Gthreads support.
2455
2456 2019-05-20 Marek Polacek <polacek@redhat.com>
2457
2458 CWG 2094 - volatile scalars are trivially copyable.
2459 PR c++/85679
2460 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
2461 result for volatile int.
2462
2463 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2464
2465 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
2466 * testsuite/experimental/names.cc: Include <experimental/filesystem>
2467 conditionally.
2468
2469 PR c++/90532 Ensure __is_constructible(T[]) is false
2470 * include/std/type_traits (__do_is_default_constructible_impl)
2471 (__is_default_constructible_atom, __is_default_constructible_safe):
2472 Remove.
2473 (is_default_constructible): Use is_constructible.
2474 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
2475 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
2476 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
2477 * testsuite/20_util/is_trivially_default_constructible/value.cc:
2478 Likewise.
2479
2480 2019-05-20 Pádraig Brady <pbrady@fb.com>
2481
2482 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
2483 to the deallocator with -fsized-deallocation.
2484
2485 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2486
2487 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
2488 test by passing correct alignment to deallocate function.
2489
2490 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
2491
2492 PR libstdc++/90520
2493 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2494 Raise exception if unique_ptr tuple member has unknown structure.
2495 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
2496 Adjust worker to support new __uniq_ptr_data base class. Do not
2497 assume field called _M_head_impl is the first tuple element.
2498
2499 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2500
2501 * include/bits/stl_deque.h
2502 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
2503 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
2504 (_Deque_base::_Deque_impl_data): New.
2505 (_Deque_base::_Deque_impl): Inherit latter.
2506 (_Deque_base::_Deque_impl::_M_swap_data): Move...
2507 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
2508 (_Deque_base::_Deque_impl()): Add noexcept qualification.
2509 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
2510 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
2511 (deque<>::deque()): Default.
2512 (deque<>::deque(deque&&)): Default.
2513 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
2514 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
2515 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
2516 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
2517 _M_range_initialize.
2518 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
2519 (deque<>::resize(size_type, const value_type&)): Share a single
2520 implementation.
2521 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
2522 _M_range_insert_aux.
2523 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
2524 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
2525 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
2526 * testsuite/23_containers/deque/allocator/default_init.cc: New.
2527
2528 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
2529
2530 PR libstdc++/90246
2531 * include/std/variant (holds_alternative, get, get_if): Improve
2532 static assertion messages.
2533 (bad_variant_access::bad_variant_access()): Change default message.
2534 (__throw_bad_variant_access(bool)): New overload.
2535 (get): Use new overload.
2536 (visit, visit<R>): Improve exception message.
2537
2538 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
2539 targets. Add more cases from P0608R3.
2540 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
2541
2542 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
2543 * include/experimental/type_traits (is_detected_exact)
2544 (is_detected_exact_v): Likewise.
2545 * include/pstl/execution_defs.h (is_execution_policy)
2546 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
2547 * include/pstl/execution_impl.h (__policy_traits): Likewise.
2548 * testsuite/17_intro/names.cc: Check for more non-reserved names.
2549 * testsuite/experimental/names.cc: New test.
2550
2551 PR libstdc++/85965
2552 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
2553 assertions from the destructor.
2554 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
2555 Move static_assert for hash function to here.
2556 (_Hash_table_base::_M_equals): Move static_assert for equality
2557 predicate to here.
2558 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
2559 Remove.
2560 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
2561 the value directly instead of calling _S_value.
2562 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
2563 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
2564 _S_key(_Const_Link_type).
2565 * testsuite/23_containers/set/85965.cc: Check construction,
2566 destruction, assignment and size() do not trigger the assertions.
2567 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
2568 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
2569 expected errors.
2570 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2571 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
2572 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2573 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2574 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2575 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2576 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2577
2578 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
2579 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
2580 in C++11.
2581
2582 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
2583 P1165R1 entries.
2584 * doc/html/*: Regenerate.
2585 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
2586 of decay_t (P0777R1).
2587
2588 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2589
2590 Move from state of allocators (LWG2593)
2591 * include/bits/stl_deque.h
2592 (_Deque_base(_Deque_base&&, false_type)): Remove.
2593 (_Deque_base(_Deque_base&&, true_type)): Remove.
2594 (_Deque_base(_Deque_base&&)): Adapt.
2595 (_Deque_base::_M_move_impl()): Remove.
2596 * testsuite/util/testsuite_allocator.h
2597 (propagating_allocator(propagating_allocator&&)): Preserve move from
2598 state.
2599 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
2600 Adapt.
2601 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
2602 Adapt.
2603 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
2604 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
2605 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
2606 Adapt.
2607 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
2608 Adapt.
2609 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
2610 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
2611 (test02): Adapt.
2612 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
2613 (test02): Adapt.
2614 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
2615 (test02): Adapt.
2616 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
2617 (test02): Adapt.
2618 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
2619 Adapt.
2620 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
2621 Adapt.
2622 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
2623 (test02): Adapt.
2624 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
2625 (test02): Adapt.
2626
2627 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
2628
2629 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
2630 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
2631
2632 * include/std/variant (__overload_set): Remove.
2633 (_Arr): New helper.
2634 (_Build_FUN): New class template to define a single FUN overload,
2635 with specializations to prevent unwanted conversions, as per P0608R3.
2636 (_Build_FUNs): New class template to build an overload set of FUN.
2637 (_FUN_type): New alias template to perform overload resolution.
2638 (__accepted_type): Use integer_constant base for failure case. Use
2639 _FUN_type for successful case.
2640 (variant::__accepted_index): Use _Tp instead of _Tp&&.
2641 (variant::variant(_Tp&&)): Likewise.
2642 (variant::operator=(_Tp&&)): Likewise.
2643
2644 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
2645 Replace raw visitation with a runtime check for the valueless state
2646 and a non-raw visitor.
2647 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
2648 (variant::index()): Remove branch.
2649 (variant::swap(variant&)): Use valueless_by_exception() instead of
2650 comparing the index to variant_npos, and add likelihood attribute.
2651
2652 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
2653 (_Hashtable_base::_Equal_hash_code): Define new class template.
2654 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
2655 _Equal_helper.
2656
2657 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
2658 Replace with _M_get non-static member function.
2659 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
2660 member function.
2661 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
2662 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
2663
2664 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
2665 _S_get accessors for members in EBO helpers.
2666 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
2667 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
2668 overloads.
2669 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
2670 helpers.
2671 (_Hashtable_base::_M_eq()): Remove non-const overload.
2672
2673 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
2674
2675 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
2676
2677 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2678
2679 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
2680 Fix return value.
2681
2682 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2683
2684 * config/os/solaris/solaris2.10: Move to ...
2685 * config/os/solaris: ... this.
2686 * configure.host (os_include_dir): Adapt.
2687 (abi_baseline_pair): Remove Solaris 10 handling.
2688 * config/abi/post/i386-solaris2.10: Remove.
2689 * config/abi/post/sparc-solaris2.10: Remove.
2690 * config/abi/post/i386-solaris2.11: Rename to ...
2691 * config/abi/post/i386-solaris: ... this.
2692 * config/abi/post/sparc-solaris2.11: Rename to ...
2693 * config/abi/post/sparc-solaris: ... this.
2694
2695 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
2696 workaround.
2697
2698 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
2699 xfail.
2700
2701 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2702
2703 * include/std/variant (__visit_with_index): Remove typedef.
2704 (__deduce_visit_result): New tag type.
2705 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
2706 visitation of possibly-valueless variants, forwarding to __do_visit
2707 with the relevant tag type.
2708 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
2709 and make lambda return void.
2710 (__variant_construct): Likewise.
2711 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
2712 __raw_idx_visit and make lambda return void.
2713 (_Multi_array::__untag_result): Add metafunction to check the function
2714 pointer type for a tag type that dictates the kind of visitation.
2715 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
2716 Use decltype(auto) instead of tagged function pointer type.
2717 (__gen_vtable_impl): Remove bool non-type parameter and unused
2718 _Variant_tuple parameter.
2719 (__gen_vtable_impl::__visit_invoke_impl): Remove.
2720 (__gen_vtable_impl::__do_visit_invoke): Remove.
2721 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
2722 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
2723 for the visit<R> case, rather than dispatching to separate functions.
2724 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
2725 lambda return void.
2726 (variant::swap): Likewise.
2727 (__do_visit): Replace two non-type template parameters with a single
2728 type parameter, so that the caller must specify the visitor's return
2729 type (or one of the tag types).
2730 (visit): Deduce a return type from the visitor and use the
2731 __deduce_visit_result tag to enforce that all overloads return the
2732 same type.
2733 (visit<R>): Call __do_visit<R> with explicit result type.
2734 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
2735 lambda return void.
2736
2737 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2738
2739 nonesuch is insufficiently useless (lwg2996)
2740 * include/std/type_traits (struct __nonesuch): Added private base
2741 class to make __nonesuch not an aggregate and removed deleted default
2742 constructor.
2743 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
2744 (operator=(const pair&)): Use __nonesuch instead of
2745 __nonesuch_no_braces.
2746 (operator=(pair&&)): Likewise
2747 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
2748 of __nonesuch_no_braces.
2749 (operator=(tuple&&)): Likewise
2750 * include/experimental/type_traits (struct nonesuch): Added private
2751 base class to make nonesuch not an aggregate and removed deleted
2752 default constructor.
2753 * testsuite/20_util/nonesuch/nonesuch.cc: New.
2754 * testsuite/experimental/type_traits/nonesuch.cc: New.
2755
2756 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2757
2758 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
2759 (_Function_handler): Remove partial specializations for void return
2760 types and pointers to member.
2761 (_Function_handler::_M_manager): Adapt to removal of
2762 _Simple_type_wrapper.
2763 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
2764 * include/std/functional (_Bind_result::__enable_if_void)
2765 (_Bind_result::__disable_if_void): Remove sfinae helpers.
2766 (_Bind_result::__call): Use __invoke_r and remove overloads for void
2767 return types.
2768 * include/std/future (__future_base::_Task_state::_M_run)
2769 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
2770 change return type of lambda expressions.
2771
2772 * include/bits/invoke.h (__invoke_r): Define new function implementing
2773 the INVOKE<R> pseudo-function.
2774 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
2775 * testsuite/20_util/function_objects/invoke/2.cc: New test.
2776
2777 * include/std/type_traits (__is_nt_convertible_helper): Define it
2778 unconditionally, not only for C++20.
2779 (__is_nothrow_convertible): Define internal trait for use in C++11.
2780 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
2781 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
2782 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
2783 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
2784 that has nothrow explicit conversion but potentially-throwing implicit
2785 conversion.
2786 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
2787 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
2788 function to only consider implicit conversions.
2789 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
2790
2791 * include/std/iterator: Include <iosfwd> instead of <istream> and
2792 <ostream>.
2793
2794 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
2795 Remove unused, non-standard function.
2796
2797 * include/bits/regex.h (match_results::max_size()): Adjust return
2798 value to account for prefix/suffix/unmatched subs.
2799 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
2800 reset the contained sub matches.
2801 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
2802 function to set result state following a failed match.
2803 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
2804 sub_match states after _M_resize. Use _M_establish_failed_match.
2805
2806 PR libstdc++/69724
2807 * include/std/thread (thread::_State_impl, thread::_S_make_state):
2808 Replace single _Callable parameter with variadic _Args pack, to
2809 forward them directly to the tuple of decayed copies.
2810 * testsuite/30_threads/thread/cons/69724.cc: New test.
2811
2812 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2813
2814 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
2815 * include/bits/basic_string.h: (operator=(const basic_string&):
2816 Move allocator decision to assign.
2817 (assign(const basic_string&)): Move allocator decision here.
2818 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2819 Add tests.
2820 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2821 Add tests.
2822
2823 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2824
2825 * testsuite/util/testsuite_allocator.h (memory_resource)
2826 (default_resource_mgr): Fix indentation.
2827
2828 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
2829 Use operator-> to access raw pointer member.
2830 * testsuite/23_containers/vector/59829.cc: Likewise.
2831 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
2832 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
2833 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
2834 for tests.
2835 (PointerBase, PointerBase_void): Derive from NullablePointer and use
2836 its constructors and equality operators. Change converting
2837 constructors to use operator-> to access private member of the other
2838 pointer type.
2839 (PointerBase_void::operator->()): Add, for access to private member.
2840 (operator-(PointerBase, PointerBase)): Change to hidden friend.
2841 (operator==(PointerBase, PointerBase)): Remove.
2842 (operator!=(PointerBase, PointerBase)): Remove.
2843
2844 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
2845 not assume field called _M_head_impl is the first tuple element.
2846 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
2847 implementation more accurate.
2848 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
2849 empty pointer type and non-empty deleter.
2850
2851 LWG 2899 - Make is_move_constructible correct for unique_ptr
2852 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
2853 move assignment operator.
2854 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
2855 (__uniq_ptr_data): New class template with conditionally deleted
2856 special members.
2857 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
2858 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
2859 constructor and move assignment operator as defaulted.
2860 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
2861 __uniq_ptr_impl::release().
2862 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
2863 to __uniq_ptr_impl::reset(pointer).
2864 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2865 Check for new __uniq_ptr_data type.
2866 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
2867
2868 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2869
2870 PR libstdc++/90454.cc path construction from void*
2871 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2872 pointers to void are rejected as well as void.
2873 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2874 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2875 pointers to void.
2876 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2877
2878 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2879 <remark> elements. Fix formatting of bibliography references.
2880
2881 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2882
2883 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2884
2885 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2886
2887 Remove Profile Mode, deprecated since 7.1.0
2888 * doc/Makefile.am: Remove XML file for profile mode docs.
2889 * doc/Makefile.in: Regenerate.
2890 * doc/xml/authors.xml: Remove authors of profile mode docs.
2891 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2892 mode.
2893 * doc/xml/manual/debug.xml: Likewise.
2894 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2895 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2896 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2897 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2898 directive.
2899 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2900 macro.
2901 * doc/html/*: Regenerate.
2902 * include/Makefile.am: Remove profile mode headers.
2903 * include/Makefile.in: Regenerate.
2904 * include/bits/c++config (std::__profile): Remove namespace.
2905 [_GLIBCXX_PROFILE]: Remove checks for macro.
2906 * include/profile/array: Remove.
2907 * include/profile/base.h: Remove.
2908 * include/profile/bitset: Remove.
2909 * include/profile/deque: Remove.
2910 * include/profile/forward_list: Remove.
2911 * include/profile/impl/profiler.h: Remove.
2912 * include/profile/impl/profiler_algos.h: Remove.
2913 * include/profile/impl/profiler_container_size.h: Remove.
2914 * include/profile/impl/profiler_hash_func.h: Remove.
2915 * include/profile/impl/profiler_hashtable_size.h: Remove.
2916 * include/profile/impl/profiler_list_to_slist.h: Remove.
2917 * include/profile/impl/profiler_list_to_vector.h: Remove.
2918 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2919 * include/profile/impl/profiler_node.h: Remove.
2920 * include/profile/impl/profiler_state.h: Remove.
2921 * include/profile/impl/profiler_trace.h: Remove.
2922 * include/profile/impl/profiler_vector_size.h: Remove.
2923 * include/profile/impl/profiler_vector_to_list.h: Remove.
2924 * include/profile/iterator_tracker.h: Remove.
2925 * include/profile/list: Remove.
2926 * include/profile/map: Remove.
2927 * include/profile/map.h: Remove.
2928 * include/profile/multimap.h: Remove.
2929 * include/profile/multiset.h: Remove.
2930 * include/profile/ordered_base.h: Remove.
2931 * include/profile/set: Remove.
2932 * include/profile/set.h: Remove.
2933 * include/profile/unordered_base.h: Remove.
2934 * include/profile/unordered_map: Remove.
2935 * include/profile/unordered_set: Remove.
2936 * include/profile/vector: Remove.
2937 * scripts/run_doxygen: Do not process profile mode headers.
2938 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2939 profile mode type.
2940 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2941 Remove dg-skip-if for profile mode.
2942 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2943 preprocessor check for profile mode.
2944 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2945 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2946 for profile mode.
2947 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2948 Likewise.
2949 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2950 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2951 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2952 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2953 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2954 Likewise.
2955 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2956 Likewise.
2957 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2958 Likewise.
2959 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2960 Likewise.
2961 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2962 preprocessor check for profile mode.
2963 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2964 Likewise.
2965 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2966 Remove dg-skip-if for profile mode.
2967 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2968 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2969 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2970 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2971 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2972 * testsuite/Makefile.am: Remove profile_flags variable and
2973 * testsuite/Makefile.am: Remove profile_flags variable and
2974 check-profile target.
2975 * testsuite/Makefile.in: Regenerate.
2976 * testsuite/ext/profile/all.cc: Remove.
2977 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2978 * testsuite/ext/profile/profiler_algos.cc: Remove.
2979 * testsuite/ext/profile/replace_new.cc: Remove.
2980 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2981 preprocessor check for profile mode.
2982 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2983 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2984 (check_v3_target_normal_mode): Do not check for profile mode macro.
2985 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2986 profile mode.
2987 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2988 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2989 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2990 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2991 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2992 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2993 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2994 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2995 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2996 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2997
2998 Remove array_allocator extension, deprecated since 4.9.0
2999 * doc/xml/manual/allocator.xml: Remove documentation for
3000 array_allocator.
3001 * doc/xml/manual/evolution.xml: Document array_allocator removal.
3002 * doc/xml/manual/using.xml: Remove header from documentation.
3003 * include/Makefile.am: Remove <ext/array_allocator.h> header.
3004 * include/Makefile.in: Regenerate.
3005 * include/ext/array_allocator.h: Remove.
3006 * include/precompiled/extc++.h: Do not include removed header.
3007 * testsuite/ext/array_allocator/1.cc: Remove.
3008 * testsuite/ext/array_allocator/2.cc: Remove.
3009 * testsuite/ext/array_allocator/26875.cc: Remove.
3010 * testsuite/ext/array_allocator/3.cc: Remove.
3011 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
3012 * testsuite/ext/array_allocator/check_delete.cc: Remove.
3013 * testsuite/ext/array_allocator/check_new.cc: Remove.
3014 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
3015 * testsuite/ext/headers.cc: Do not include removed header.
3016
3017 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
3018
3019 * include/bits/stl_bvector.h
3020 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3021 Make hidden friend.
3022 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3023 Likewise.
3024 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3025 Likewise.
3026 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3027 Likewise.
3028 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3029 Likewise.
3030 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3031 Likewise.
3032 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3033 Likewise.
3034 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
3035 copy elision.
3036 (_Bit_iterator::operator-(difference_type)): Likewise.
3037 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
3038 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
3039 NRVO copy elision.
3040 (_Bit_const_iterator::operator-(difference_type)): Likewise.
3041 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
3042
3043 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
3044
3045 PR libstdc++/81266
3046 * testsuite/util/thread/all.h: Do not use remove_pointer for
3047 std::thread::native_handle_type.
3048
3049 PR libstdc++/90397
3050 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
3051 (_Variant_storage<true, Types...>::_M_reset()))
3052 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
3053 (__get_storage): Likewise.
3054 (variant): Add noexcept to friend declarations for __get and
3055 __get_storage.
3056
3057 PR libstdc++/90388
3058 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
3059 Use _Require for constraints.
3060 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
3061 per the standard.
3062 (__uniq_ptr_hash): New base class with conditionally-disabled call
3063 operator.
3064 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
3065 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
3066 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
3067
3068 * include/bits/shared_ptr.h: Improve docs.
3069 * include/bits/shared_ptr_base.h: Likewise.
3070 * include/bits/stl_uninitialized.h: Likewise.
3071 * include/bits/unique_ptr.h: Likewise.
3072 * libsupc++/new: Likewise.
3073
3074 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
3075
3076 * include/bits/stl_deque.h
3077 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3078 Make hidden friend.
3079 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3080 Likewise.
3081 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3082 Likewise.
3083 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3084 Likewise.
3085 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3086 Likewise.
3087 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3088 Likewise.
3089 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
3090 copy elision.
3091 (_Deque_iterator<>::operator-(difference_type)): Likewise.
3092
3093 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
3094
3095 PR libstdc++/90277
3096 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
3097 (test01): Reserve for number of insertions to avoid rehash during test.
3098 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3099 (test01): Likewise.
3100 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3101 (test01): Likewise.
3102 (test02): Likewise.
3103 (test03): Likewise.
3104
3105 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
3106
3107 * include/experimental/bits/fs_path.h: Improve docs.
3108 * include/experimental/bits/net.h: Fix wrong header name in comment.
3109 Do not document implementation details.
3110 * include/experimental/netfwd: Fix doxygen grouping.
3111
3112 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3113
3114 * include/bits/stl_pair.h: Improve docs.
3115 * include/std/tuple: Likewise.
3116
3117 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
3118 inline namespace.
3119 * include/std/chrono: Improve docs.
3120 * include/std/ratio: Do not document implementation details.
3121 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
3122 line numbers.
3123 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
3124
3125 PR libstdc++/89102
3126 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
3127 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
3128 (__duration_common_type): New helper.
3129 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
3130 __duration_common_type.
3131 (__timepoint_common_type_wrapper): Replace with ...
3132 (__timepoint_common_type): New helper.
3133 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
3134 Use __time_point_common_type.
3135 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
3136 (__common_type_impl): If either argument is transformed by decay,
3137 use the common_type of the decayed types.
3138 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
3139 decayed, use __do_common_type_impl to get the common_type.
3140 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
3141 (__do_member_type_wrapper, __member_type_wrapper)
3142 (__expanded_common_type_wrapper): Remove.
3143 (__common_type_pack, __common_type_fold): New helpers.
3144 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
3145 __member_type_wrapper and __expanded_common_type_wrapper.
3146 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3147 Test zero-length template argument list.
3148 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3149 Test single argument cases and argument types that should decay.
3150 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3151 Adjust expected error.
3152 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
3153 dg-error lineno.
3154 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
3155 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
3156 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
3157
3158 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
3159
3160 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
3161
3162 Make allocator propagation more consistent for
3163 operator+(basic_string) (P1165R1)
3164 * include/bits/basic_string.h
3165 (operator+(basic_string&&, basic_string&&): Changed resulting
3166 allocator to always be the one from the first parameter.
3167 * include/bits/basic_string.tcc
3168 (operator+(const _CharT*, const basic_string&)): Changed
3169 resulting allocator to be SOCCC on the second parameter's allocator.
3170 (operator+(_CharT, const basic_string&)): Likewise.
3171 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
3172 New.
3173 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
3174 New.
3175
3176 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3177
3178 * include/bits/regex.h: Improve docs.
3179 * include/bits/regex.tcc: Do not document implementation details.
3180
3181 * testsuite/19_diagnostics/error_code/hash.cc: New test.
3182
3183 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
3184
3185 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
3186 Add type printer for container types in std::__debug namespace.
3187 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
3188 (gdb-tests): Use distinct parameters for the type of test and use of
3189 regex.
3190 (gdb-test): Check for regex test even if 'whatis' test.
3191 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
3192 mode.
3193 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3194 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
3195 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3196 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3197 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3198 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3199 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3200
3201 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
3202
3203 * include/std/system_error (error_category): Fix comment.
3204
3205 PR libstdc++/90299
3206 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
3207 argument is an empty path.
3208 (absolute(const path&, error_code&)): Use invalid_argument as error
3209 code instead of no_such_file_or_directory.
3210 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
3211 of non-existent paths and empty paths with both overloads of absolute.
3212
3213 * include/std/system_error (error_category, error_code)
3214 (error_condition): Improve docs.
3215 * libsupc++/exception: Add missing @addtogroup Doxygen command.
3216 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
3217 to class documentation. Suppress documentation for implementation
3218 details.
3219 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
3220 Suppress documentation for implementation details.
3221
3222 * include/std/system_error (error_code): Remove friend declaration
3223 for hash<error_code>.
3224 (hash<error_code>::operator()): Use public member functions to access
3225 value and category.
3226 (hash<error_condition>::operator()): Use address of category, not
3227 its object representation.
3228 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
3229 Use public member functions to access value and category.
3230 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
3231
3232 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
3233
3234 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
3235 * include/bits/hashtable_policy.h
3236 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
3237 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
3238 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
3239 smaller than input value rather than always greater. Preserve
3240 _M_next_resize if called with 0 input. Use __builtin_floorl.
3241 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
3242 elements + number of insertions is greater than _M_next_resize. Start
3243 with 11 buckets if not told otherwise. Use __builtin_floorl.
3244 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
3245 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
3246 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
3247 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
3248 told otherwise. Use __builtin_floorl.
3249 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
3250 to also validate _Power2_rehash_policy.
3251 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
3252 Adapt.
3253
3254 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
3255
3256 PR libstdc++/61761
3257 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
3258 std::copysign.
3259
3260 PR libstdc++/52119
3261 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
3262 overflow warning with -Wpedantic -Wsystem-headers.
3263
3264 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
3265
3266 PR libstdc++/90314
3267 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
3268 * include/bits/move.h (swap): Remove extra parentheses.
3269
3270 * include/experimental/bits/lfts_config.h: Improve doc markup.
3271 * include/experimental/optional: Improve docs.
3272 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
3273 (__constexpr_addressof): Remove.
3274 (optional::operator->()): Use std::__addressof().
3275 * include/std/optional (optional::operator->()): Adjust whitespace.
3276 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
3277 that operator-> is still constexpr with overloaded operator&. Change
3278 to compile-only test.
3279 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
3280 compile-only test.
3281
3282 * include/bits/shared_ptr.h: Improve docs.
3283 * include/bits/shared_ptr_atomic.h: Likewise.
3284 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
3285
3286 * include/bits/basic_string.h: Fix iterator/index confusion in
3287 Doxygen comments.
3288 * include/bits/range_access.h: Fix Doxygen warnings.
3289 * include/bits/refwrap.h: Do not document implementation details.
3290 (ref, cref): Group docs with reference_wrapper.
3291 * include/std/fstream: Fix Doxygen markup.
3292 * libsupc++/initializer_list (begin, end): Group docs with
3293 initializer_list.
3294
3295 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
3296
3297 * include/bits/unique_lock.h: Fix/improve doxygen markup.
3298 * include/std/mutex: Likewise.
3299 * include/std/shared_mutex: Likewise.
3300
3301 * include/bits/fs_dir.h: Fix/improve doxygen markup.
3302 * include/bits/fs_fwd.h: Likewise.
3303 * include/bits/fs_ops.h: Likewise.
3304 * include/bits/fs_path.h: Likewise.
3305 * include/std/filesystem: Likewise.
3306
3307 * include/experimental/bits/net.h: Fix/improve doxygen markup.
3308 * include/experimental/buffer: Likewise.
3309 * include/experimental/executor: Likewise.
3310 * include/experimental/internet: Likewise.
3311 * include/experimental/io_context: Likewise.
3312 * include/experimental/net: Likewise.
3313 * include/experimental/netfwd: Likewise.
3314 * include/experimental/socket: Likewise.
3315 * include/experimental/timer: Likewise.
3316
3317 * doc/doxygen/doxygroups.cc: Move description of experimental group
3318 here.
3319 * include/experimental/algorithm: Add to libfund-ts doc group.
3320 * include/experimental/any: Likewise. Do not document implementation
3321 details.
3322 * include/experimental/array: Add to libfund-ts doc group.
3323 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
3324 for Library Fundamentals.
3325 * include/experimental/chrono: Add to libfund-ts doc group.
3326 * include/experimental/deque: Likewise.
3327 * include/experimental/forward_list: Likewise.
3328 * include/experimental/functional: Likewise.
3329 * include/experimental/iterator: Likewise.
3330 * include/experimental/list: Likewise.
3331 * include/experimental/map: Likewise.
3332 * include/experimental/memory: Likewise.
3333 * include/experimental/memory_resource: Likewise. Improve docs.
3334 details.
3335 * include/experimental/numeric: Add to libfund-ts doc group.
3336 * include/experimental/optional: Likewise.
3337 * include/experimental/propagate_const: Likewise.
3338 * include/experimental/random: Likewise.
3339 * include/experimental/ratio: Likewise.
3340 * include/experimental/regex: Likewise.
3341 * include/experimental/set: Likewise.
3342 * include/experimental/source_location: Likewise.
3343 * include/experimental/string: Likewise.
3344 * include/experimental/string_view: Likewise.
3345 * include/experimental/system_error: Likewise.
3346 * include/experimental/tuple: Likewise.
3347 * include/experimental/type_traits: Likewise.
3348 * include/experimental/unordered_map: Likewise.
3349 * include/experimental/unordered_set: Likewise.
3350 * include/experimental/utility: Likewise.
3351 * include/experimental/vector: Likewise.
3352 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
3353 * testsuite/experimental/array/neg.cc: Adjust dg-error.
3354 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
3355 Likewise.
3356 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
3357 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
3358 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
3359 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
3360 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
3361
3362 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
3363 * include/experimental/bits/fs_fwd.h: Improve docs.
3364 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
3365 * include/experimental/bits/fs_path.h: Likewise.
3366 (path, filesystem_error, u8path): Improve docs.
3367 * include/experimental/filesystem: Link to docs for TS.
3368
3369 * config/allocator/new_allocator_base.h (__allocator_base): Add
3370 workaround for Doxygen bug #6945.
3371 * include/std/memory: Improve docs. Define group for pointer safety.
3372 * include/std/scoped_allocator: Improve docs. Use "undocumented"
3373 conditional to suppress documentation for implementation details.
3374
3375 * include/bits/specfun.h: Improve docs.
3376 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
3377 and namespaces.
3378
3379 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
3380 (std::experimental): Add docs.
3381 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
3382 namespace to nothing when generating docs.
3383 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
3384 * include/std/chrono (std::chrono): Likewise.
3385 * include/std/functional (std::placeholders): Likewise.
3386 * include/std/thread (std::this_thread): Likewise.
3387
3388 * include/parallel/settings.h: Fix Doxygen markup.
3389
3390 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
3391 anything unless PB_DS_CLASS_C_DEC is defined.
3392 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
3393 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
3394 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
3395 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
3396 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
3397 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
3398 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
3399 Likewise.
3400 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
3401 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
3402 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
3403 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
3404 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
3405 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
3406 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
3407 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
3408 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
3409 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
3410 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
3411 Likewise.
3412 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
3413 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
3414 Likewise.
3415 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
3416 Likewise.
3417
3418 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
3419 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
3420 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
3421 Doxygen expands.
3422
3423 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3424
3425 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
3426 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
3427 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
3428 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
3429 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
3430 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
3431 Likewise.
3432 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
3433 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
3434 Likewise.
3435
3436 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
3437
3438 PR libstdc++/61761
3439 * include/std/complex (__complex_proj): Return parameter unchanged.
3440 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
3441 floating-point types to take std::complex arguments.
3442 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
3443 floating-point types.
3444 * testsuite/26_numerics/complex/proj.cc: New test.
3445
3446 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3447
3448 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
3449 to _Lock_policyE[012].
3450 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3451
3452 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
3453
3454 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
3455 macros accidentally left in.
3456 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
3457 unnecessary -lstdc++fs option. Fix test for mingw.
3458 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3459 Fix test for mingw.
3460
3461 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3462
3463 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3464
3465 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
3466
3467 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
3468
3469 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
3470 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
3471
3472 PR libstdc++/71312
3473 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
3474
3475 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
3476 attribute.
3477
3478 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
3479 class template and partial specialization.
3480
3481 PR libstdc++/87982
3482 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
3483 an integral type.
3484 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
3485 functions to convert a value to an integral type.
3486 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
3487 (fill_n): Convert _Size parameter to an integral type.
3488 * testsuite/25_algorithms/fill_n/87982.cc: New test.
3489 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
3490 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
3491 * testsuite/25_algorithms/generate_n/87982.cc: New test.
3492 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
3493 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
3494
3495 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
3496
3497 Adding noexcept-specification on tuple constructors (LWG 2899)
3498 * libstdc++-v3/include/std/tuple:
3499 (tuple()): Add noexcept-specification.
3500 (tuple(const _Elements&...)): Likewise
3501 (tuple(_UElements&&...)): Likewise
3502 (tuple(const tuple<_UElements...>&)): Likewise
3503 (tuple(tuple<_UElements...>&&)): Likewise
3504 (tuple(const _T1&, const _T2&)): Likewise
3505 (tuple(_U1&&, _U2&&)): Likewise
3506 (tuple(const tuple<_U1, _U2>&): Likewise
3507 (tuple(tuple<_U1, _U2>&&): Likewise
3508 (tuple(const pair<_U1, _U2>&): Likewise
3509 (tuple(pair<_U1, _U2>&&): Likewise
3510 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
3511
3512 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
3513
3514 PR libstdc++/87106
3515 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
3516 arguments with __restrict.
3517
3518 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
3519
3520 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3521
3522 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
3523
3524 * include/experimental/bits/fs_path.h
3525 (path::_S_convert_loc<_InputIterator>): Create const std::string to
3526 avoid redundant call to _S_convert_loc with non-const pointers.
3527
3528 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
3529 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
3530 * testsuite/21_strings/basic_string/hash/hash.cc
3531 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
3532 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
3533 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
3534
3535 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
3536 wstring::_M_replace_dispatch with more specific patterns.
3537 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
3538 Create const std::string to avoid redundant call to _S_convert_loc
3539 with non-const pointers.
3540 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
3541 avoid unnecessary basic_string::assign instantiations.
3542
3543 * include/std/memory (__uses_alloc_args): Add string-literal to
3544 static_assert, to match the one in __uses_alloc.
3545 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
3546 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
3547 for recursive uses-allocator construction of nested pairs.
3548 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
3549 comment.
3550
3551 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3552
3553 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
3554 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
3555 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
3556 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
3557
3558 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3559 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3560 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
3561 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3562 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3563 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3564 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3565
3566 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
3567
3568 PR libstdc++/90239
3569 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
3570 * include/std/scoped_allocator [__cplusplus > 201703L]
3571 (scoped_allocator_adaptor::construct): Define in terms of
3572 uses_allocator_construction_args, as per P0591R4.
3573 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
3574 * testsuite/util/testsuite_allocator.h: Remove name of unused
3575 parameter.
3576
3577 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
3578
3579 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
3580 * doc/html/*: Regenerate.
3581
3582 * include/bits/fs_path.h (operator<, operator<=, operator>)
3583 (operator>=, operator==, operator!=): Make hidden friends, as per
3584 LWG 3065.
3585 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
3586 string type in test.
3587 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3588
3589 * include/std/any (any::any(ValueType&&)): Use __and_v.
3590 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
3591 Likewise.
3592
3593 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
3594 as per P0777R1.
3595 * include/std/type_traits (__result_of_memfun): Use remove_reference
3596 instead of __remove_cvref_t and remove redundant is_same check.
3597 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
3598
3599 * include/experimental/string_view (basic_string_view::pointer)
3600 (basic_string_view::reference): Fix to refer to non-const value_type.
3601 * include/bits/basic_string.h (basic_string): Use __sv_check and
3602 __sv_limit instead of basic_string_view::_M_check and
3603 basic_string_view::_M_limit.
3604 * include/std/string_view (__sv_check, __sv_limit): New
3605 helper functions to replace basic_string_view::_M_check and
3606 basic_string_view::_M_limit.
3607 (basic_string_view): Add static assertions to enforce ill-formed
3608 requirement for traits_type::char_type from P1148R0, and to enforce
3609 required properties of char-like types.
3610 (basic_string_view::pointer, basic_string_view::reference): Fix to
3611 refer to non-const value_type.
3612 (basic_string_view::operator[], basic_string_view::at)
3613 (basic_string_view::front, basic_string_view::back)
3614 (basic_string_view::data): Use const_reference and const_pointer
3615 typedefs for return types.
3616 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
3617 (hash<wstring_view>): Fix argument_type typedef.
3618 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3619 char/1.cc: Fix expected return type of basic_string_view::data().
3620 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3621 wchar_t/1.cc: Likewise.
3622 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3623 char/1.cc: Likewise.
3624 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3625 wchar_t/1.cc: Likewise.
3626 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
3627 New test.
3628 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3629 Check reference and pointer typedefs.
3630 * testsuite/experimental/string_view/requirements/typedefs.cc:
3631 Likewise.
3632 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
3633 Fix expected return type of basic_string_view::data().
3634 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
3635 1.cc: Likewise.
3636 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
3637 Likewise.
3638 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
3639 1.cc: Likewise.
3640
3641 PR libstdc++/90220
3642 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
3643 Avoid a runtime check for types that can never be stored in std::any.
3644 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3645 array types.
3646
3647 PR libstdc++/90220 (partial)
3648 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
3649 not attempt ill-formed static_cast to pointers to non-object types.
3650 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3651 function types.
3652
3653 * testsuite/20_util/variant/run.cc: Catch exception by reference to
3654 prevent -Wcatch-value warning.
3655
3656 * include/std/variant (__variant_construct): Use template parameter
3657 type instead of equivalent decltype-specifier.
3658 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
3659 Replace forward with move.
3660 (_Move_ctor_base<false, Types...>::_M_destructive_move)
3661 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
3662 (_Move_ctor_base<true, Types...>::_M_destructive_move)
3663 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
3664 index after construction succeeds.
3665 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
3666 if-constexpr checks that are always true. Use __remove_cvref_t instead
3667 of remove_reference so that is_nothrow_move_constructible check
3668 doesn't use a const rvalue parameter. In the potentially-throwing case
3669 construct a temporary and move assign it, as per LWG 2904.
3670 (_Move_assign_base<false, Types...>::operator=): Remove redundant
3671 if-constexpr checks that are always true. Use emplace as per LWG 2904.
3672 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
3673 construct a temporary and move assign from it, as per LWG 2904.
3674 * testsuite/20_util/variant/exception_safety.cc: Check that
3675 assignment operators have strong exception safety guarantee.
3676
3677 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
3678
3679 Document PSTL linker flags
3680
3681 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
3682
3683 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3684
3685 * include/std/variant (__detail::__variant::_Traits): Make
3686 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
3687 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
3688 P0602R4.
3689 (__detail::__variant::_Copy_assign_alias): Only depend on
3690 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
3691 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
3692 move assignment operators.
3693
3694 PR libstdc++/90165
3695 * include/std/variant (variant::__not_self): New helper for the
3696 is_same_v<remove_cvref_t<T>, variant>==false constraints.
3697 (variant::__to_type_impl): Remove.
3698 (variant::__to_type): Add default argument to check pack size, instead
3699 of using __to_type_impl.
3700 (variant::__accepted_type): Add default argument using __not_self.
3701 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
3702 for variant(T&&) constructor constraint.
3703 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
3704 Extract __accepted_type into a named template parameter for reuse in
3705 other constraints and in the exception specification.
3706 (variant::variant(in_place_type_t<T>, Args&&...))
3707 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
3708 (variant::variant(in_place_index_t<T>, Args&&...))
3709 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
3710 (variant::operator=T&&)): Remove redundant && from trait arguments.
3711 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
3712 isn't used for in_place_type or in_place_index arguments.
3713
3714 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
3715 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
3716 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
3717
3718 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3719 Bernd Edlinger <bernd.edlinger@hotmail.de>
3720 Jakub Jelinek <jakub@redhat.com>
3721
3722 PR target/89093
3723 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
3724 general-regs-only target attribute for ARM.
3725
3726 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3727
3728 PR libstdc++/87431
3729 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
3730 specialization also depend on is_nothrow_move_constructible.
3731 * include/std/variant (__detail::__variant::__never_valueless()):
3732 Only true if the variant would have a move assignment operator.
3733 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
3734 Check __never_valueless<T...>().
3735 (variant::emplace): Only perform non-throwing move assignments
3736 for never-valueless alternatives if the variant has a move assignment
3737 operator.
3738 * testsuite/20_util/variant/compile.cc: Check that never-valueless
3739 types can be emplaced into non-assignable variants.
3740 * testsuite/20_util/variant/run.cc: Check that never-valueless types
3741 don't get copied when emplaced into non-assignable variants.
3742
3743 * include/std/variant (__detail::__variant::__ref_cast): Remove
3744 unused function.
3745 (__detail::__variant::_Uninitialized::_M_get)
3746 (__detail::__variant::__get)
3747 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
3748
3749 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
3750
3751 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
3752 to Darwin10.
3753 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3754 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3755 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3756 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3757
3758 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3759
3760 Delegate PSTL configuration to pstl/pstl_config.h
3761
3762 * include/bits/c++config: Remove explicit PSTL configuration
3763 macros and use definitions from <pstl/pstl_config.h>.
3764
3765 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3766
3767 Cleanup algorithm implementations
3768 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
3769 execution policy.
3770 (mismatch): Forward execution policy.
3771 (equal): Qualify call to std::equal().
3772 (partial_sort): Forward execution policy.
3773 (inplace_merge): Forward execution policy.
3774
3775 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
3776
3777 Improve implementation of parallel equal()
3778 * include/pstl/algorithm_impl.h
3779 (__internal::__brick_equal): use "4 iterator" version of
3780 std::equal().
3781 (__internal::__brick_equal): use simd for random access
3782 iterators on unsequenced execution policies.
3783 (__internal::__pattern_equal): add "4 iterator" version
3784 (__internal::__pattern_equal): dispatch to simd __brick_equal
3785 for vector-only execution policies.
3786 (__internal::__pattern_equal): dispatch to __parallel_or for
3787 parallel execution policies.
3788 * include/pstl/glue_algorithm_impl.h
3789 (std::equal): dispatch to "4 iterator" version of
3790 __internal::__pattern_equal().
3791
3792 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
3793
3794 PR libstdc++/90105
3795 * include/bits/forward_list.h (operator==): Do not use operator!= to
3796 compare elements.
3797 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
3798 earlier in the list, so that sort is stable.
3799 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
3800 * testsuite/23_containers/forward_list/comparable.cc: Test with
3801 types that meet the minimum EqualityComparable and LessThanComparable
3802 requirements. Remove irrelevant comment.
3803
3804 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
3805 Do not depend on whether all alternative types are move constructible.
3806 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
3807 from the operand when deciding whether to perform the assignment.
3808 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
3809 with deleted move constructor and deleted move assignment operator.
3810 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
3811 behaviour of variants with DeletedMoves as an alternative.
3812 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
3813 (move_ctor, move_assign): Check that moving a variant with a
3814 DeletedMoves alternative falls back to copying instead of moving.
3815
3816 * testsuite/20_util/variant/compile.cc: Remove empty string literals
3817 from static_assert declarations.
3818
3819 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
3820 actually match its name.
3821 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
3822 (test_swap()): Fix result for MoveCtorOnly and check
3823 MoveCtorAndSwapOnly.
3824
3825 * include/std/optional (optional::value_or(U&&) &&): Add missing
3826 constexpr specifier.
3827 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
3828 for disengaged optionals and rvalue optionals.
3829 * testsuite/20_util/optional/observers/4.cc: Likewise.
3830
3831 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
3832
3833 * include/pstl/algorithm_impl.h: Uglify identfiers.
3834 * include/pstl/numeric_impl.h: Uglify identfiers.
3835 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
3836
3837 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
3838
3839 * include/bits/c++config:
3840 Add definition for __PSTL_ASSERT.
3841 Add definition for __PSTL_ASSERT_MSG.
3842 * include/pstl/algorithm_impl.h: Replace use of assert().
3843 * include/pstl/numeric_impl.h: Replace use of assert().
3844 * include/pstl/parallel_backend_tbb.h:
3845 Replace use of assert().
3846 Replace use of __TBB_ASSERT().
3847 * include/pstl/parallel_backend_utils.h: Replace use of assert().
3848
3849 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
3850
3851 PR libstdc++/90046
3852 * src/c++17/memory_resource.cc
3853 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
3854 needed to allow placing a _Chunk at the end of the buffer.
3855 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
3856
3857 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
3858
3859 * doc/xml/faq.xml: Add information about emergency EH pool.
3860 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
3861 Move outdated information on mt_allocator to a separate section.
3862 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
3863 doesn't affect the default allocator.
3864
3865 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
3866 typo.
3867
3868 PR libstdc++/89851
3869 * testsuite/20_util/variant/89851.cc: New test.
3870
3871 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3872
3873 * include/std/variant: Adjust whitespace. Add comments.
3874 (_Multi_array): Leave primary template undefined.
3875 (_Multi_array<_Tp>): Define partial specialization for base case of
3876 recursion.
3877 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3878 which is always a reference.
3879 (__gen_vtable::_S_apply()): Remove function, inline body into
3880 default member initializer.
3881 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3882
3883 * include/std/variant (__variant_idx_cookie): Add member type.
3884 (__visitor_result_type): Remove.
3885 (__do_visit): Use invoke_result instead of __visitor_result_type.
3886 * testsuite/20_util/variant/visit.cc: New test.
3887
3888 PR libstdc++/90008
3889 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3890 unused capture.
3891 * testsuite/20_util/variant/90008.cc: New test.
3892
3893 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3894
3895 * include/pstl/algorithm_impl.h: Add namespace qualification.
3896 * include/pstl/execution_defs.h: Add namespace qualification.
3897 * include/pstl/execution_impl.h: Add namespace qualification.
3898 * include/pstl/numeric_impl.h: Add namespace qualification.
3899 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3900 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3901 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3902
3903 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3904
3905 Fix visit<R> for variant.
3906 * include/std/variant (__do_visit): Add a template parameter
3907 for enforcing same return types for visit.
3908 (__gen_vtable_impl): Likewise.
3909 (_S_apply_single_alt): Adjust.
3910 (__visit_invoke_impl): New. Handle casting to void.
3911 (__do_visit_invoke): New. Enforces same return types.
3912 (__do_visit_invoke_r): New. Converts return types.
3913 (__visit_invoke): Adjust.
3914 (__gen_vtable): Add a template parameter for enforcing
3915 same return types for visit.
3916 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3917 different return types.
3918 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3919 visitors with different return types don't accidentally
3920 compile with regular visitation.
3921
3922 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3923
3924 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3925 dg-require-filesystem-ts.
3926
3927 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3928
3929 * doc/xml/manual/status_cxx2020.xml: Update status.
3930 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3931 * testsuite/20_util/variant/visit_r.cc: New test.
3932
3933 * include/bits/fs_dir.h (directory_iterator::operator*)
3934 (directory_iterator::operator->): Add noexcept.
3935 (operator==, operator!=): Replace namespace-scope equality operators
3936 for directory iterators with hidden friends.
3937
3938 PR libstdc++/89986
3939 * config/abi/pre/gnu.ver: Add missing exports.
3940 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3941 increment member.
3942
3943 * config/abi/pre/gnu.ver: Export new symbols.
3944 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3945 (recursive_directory_iterator::recursion_pending())
3946 (recursive_directory_iterator::disable_recursion_pending()): Remove
3947 inline definitions. Make noexcept.
3948 (recursive_directory_iterator::depth())
3949 (recursive_directory_iterator::operator*())
3950 (recursive_directory_iterator::operator->()): Make noexcept.
3951 (recursive_directory_iterator::_M_options)
3952 (recursive_directory_iterator::_M_pending): Remove data members.
3953 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3954 (recursive_directory_iterator::recursive_directory_iterator): Remove
3955 ctor-initializer. Use new constructor for _Dir_stack.
3956 (recursive_directory_iterator::options())
3957 (recursive_directory_iterator::recursion_pending())
3958 (recursive_directory_iterator::disable_recursion_pending()): Add
3959 non-inline definitions.
3960 (recursive_directory_iterator::depth()): Make noexcept.
3961 (recursive_directory_iterator::increment(error_code&))
3962 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3963 location of options and recursion_pending members.
3964 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3965 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3966 user-declared move constructor and assignment operator, to make the
3967 type move-only.
3968
3969 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3970 d_type == DT_UNKNOWN immediately.
3971 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3972 handling here.
3973 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3974
3975 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3976 assignment.
3977 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3978 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3979 assignment.
3980
3981 PR libstdc++/87431 (again)
3982 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3983 Define partial specialization for basic_string.
3984 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3985 shared_ptr and weak_ptr.
3986 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3987 function.
3988 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3989 vector.
3990 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3991 unique_ptr.
3992 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3993 vector.
3994 * include/std/any (_Never_valueless_alt): Define explicit
3995 specialization for any.
3996 * include/std/variant (_Never_valueless_alt): Define primary template.
3997 (__never_valueless): Use _Never_valueless_alt instead of
3998 is_trivially_copyable.
3999 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
4000 initializations to avoid try-catch overhead. Add special case for
4001 scalars produced by potentially-throwing conversions. Use
4002 _Never_valueless_alt instead of is_trivially_copyable for the
4003 remaining strong exception-safety cases.
4004 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
4005 * testsuite/20_util/variant/87431.cc: Run both test functions.
4006 * testsuite/20_util/variant/exception_safety.cc: New test.
4007 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
4008 so the variant becomes valueless.
4009
4010 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
4011
4012 PR libstdc++/85184
4013 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
4014 Remove assertions.
4015 (variant::emplace<_Tp>): Return result of emplace<N> directly.
4016
4017 * include/std/string (__hash_string_base): New class template defining
4018 operator() for hashing strings.
4019 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
4020 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
4021 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
4022 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
4023
4024 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
4025
4026 Use single-visitation in variant assignment and swap and relops.
4027 Also use indices instead of types when checking whether
4028 variants hold the same thing.
4029 * include/std/variant (__do_visit): Add a template parameter
4030 for index visitation, invoke with indices if index visitation
4031 is used.
4032 (__variant_idx_cookie): New.
4033 (__visit_with_index): Likewise.
4034 (_Copy_assign_base::operator=): Do single-visitation with
4035 an index visitor.
4036 (_Move_assign_base::operator=): Likewise.
4037 (_Extra_visit_slot_needed): Adjust.
4038 (__visit_invoke): Call with indices if it's an index visitor.
4039 (relops): Do single-visitation with an index visitor.
4040 (swap): Likewise.
4041 (__visitor_result_type): New.
4042
4043 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
4044
4045 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
4046
4047 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4048
4049 Don't revisit a variant we are already visiting.
4050 * include/std/variant (__variant_construct_single): New.
4051 (__variant_construct): Use it.
4052 (_M_destructive_move): Likewise.
4053 (_M_destructive_copy): Likewise.
4054 (_Copy_assign_base::operator=): Adjust.
4055 (_Move_assign_base::operator=): Likewise.
4056 (swap): Likewise.
4057
4058 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
4059
4060 PR libstdc++/85965
4061 * include/bits/hashtable.h (_Hashtable): Move static assertions to
4062 destructor so they are not evaluated until the _Key type is complete.
4063 * include/bits/stl_tree.h (_Rb_tree): Likewise.
4064 * testsuite/23_containers/set/85965.cc: New test.
4065 * testsuite/23_containers/unordered_set/85965.cc: New test.
4066 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
4067 with regexp matching the corresponding _Rb_tree specialization.
4068 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
4069 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
4070 * testsuite/23_containers/set/48101_neg.cc: Likewise.
4071 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
4072 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
4073 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
4074 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
4075
4076 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4077
4078 PR libstdc++/89825
4079 Fix based on a suggestion by Antony Polukhin.
4080 * include/std/variant (__never_valueless): New.
4081 (_M_valid): Use it.
4082 (_Extra_visit_slot_needed): New.
4083 (_Multi_array): Use it.
4084 (_S_apply_all_alts): Likewise.
4085
4086 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4087
4088 PR libstdc++/89824
4089 Fix based on a suggestion by Antony Polukhin.
4090 * include/std/variant (__gen_vtable): Don't reserve an
4091 additional table slot, _Multi_array already does that.
4092
4093 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4094
4095 PR libstdc++/89816
4096 Fix based on a suggestion by Antony Polukhin.
4097 * include/std/variant (__variant_construct): Capture a pointer
4098 to the storage and visit just one variant.
4099
4100 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
4101
4102 * doc/xml/manual/backwards_compatibility.xml: Remove link to
4103 Doxygen-generated pages with unstable URL.
4104 * doc/xml/manual/concurrency_extensions.xml: Likewise.
4105 * doc/xml/manual/extensions.xml: Likewise.
4106 * doc/xml/manual/parallel_mode.xml: Likewise.
4107 * doc/xml/manual/support.xml: Likewise.
4108
4109 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
4110 avoid -Wconversion warnings.
4111
4112 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
4113
4114 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
4115 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
4116 (allstamped): Add stamp-pstl.
4117 (install-headers): Add ptsl_builddir.
4118 * include/Makefile.in: Regenerate.
4119 * include/bits/c++config: Add pstl configuration.
4120 * include/pstl/LICENSE.txt: New file.
4121 * include/pstl/algorithm_fwd.h: New file.
4122 * include/pstl/algorithm_impl.h: New file.
4123 * include/pstl/execution_defs.h: New file.
4124 * include/pstl/execution_impl.h: New file.
4125 * include/pstl/glue_algorithm_defs.h: New file.
4126 * include/pstl/glue_algorithm_impl.h: New file.
4127 * include/pstl/glue_execution_defs.h: New file.
4128 * include/pstl/glue_memory_defs.h: New file.
4129 * include/pstl/glue_memory_impl.h: New file.
4130 * include/pstl/glue_numeric_defs.h: New file.
4131 * include/pstl/glue_numeric_impl.h: New file.
4132 * include/pstl/memory_impl.h: New file.
4133 * include/pstl/numeric_fwd.h: New file.
4134 * include/pstl/numeric_impl.h: New file.
4135 * include/pstl/parallel_backend.h: New file.
4136 * include/pstl/parallel_backend_tbb.h: New file.
4137 * include/pstl/parallel_backend_utils.h: New file.
4138 * include/pstl/parallel_impl.h: New file.
4139 * include/pstl/pstl_config.h: New file.
4140 * include/pstl/unseq_backend_simd.h: New file.
4141 * include/pstl/utils.h: New file.
4142 * include/std/algorithm: Include parallel algorithm implementations.
4143 * include/std/execution: New file.
4144 * include/std/memory: Include parallel algorithm implementations.
4145 * include/std/numeric: Include parallel algorithm implementations.
4146 * include/std/version: Add parallel algorithms feature test macro.
4147 * testsuite/util/pstl/pstl_test_config.h: New file.
4148 * testsuite/util/pstl/test_utils.h: New file.
4149 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4150 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4151 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4152 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4153 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4154 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4155 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4156 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4157 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4158 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4159 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4160 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4161 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4162 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4163 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4164 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4165 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4166 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4167 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4168 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4169 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4170 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4171 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4172 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4173 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4174 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4175 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4176 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4177 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4178 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4179 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4180 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4181 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4182 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4183 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4184 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4185 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4186 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4187 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4188 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4189 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4190 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4191 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4192 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4193 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4194 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4195 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4196 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4197 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4198 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4199 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4200 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4201 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4202 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4203 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4204 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4205 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4206 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4207 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4208 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4209 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4210 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4211 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4212 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4213 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4214 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4215 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4216 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4217 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4218 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4219 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4220 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4221 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4222 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4223 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4224 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4225 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4226 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4227 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4228 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4229 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4230 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4231 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4232 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4233 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4234 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4235 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4236 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4237 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4238 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4239 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4240 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4241 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4242 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4243 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4244 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4245 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4246 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4247 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4248 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4249 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4250 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4251 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4252 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4253 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4254 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4255
4256 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
4257
4258 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
4259 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
4260 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
4261 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
4262 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
4263 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
4264 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
4265 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
4266 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
4267 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
4268 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
4269 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
4270 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
4271 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
4272 when the special functions IS is enabled, not for C++17.
4273 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
4274 Replace with ...
4275 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
4276 without checks for special functions in C++17.
4277 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4278 New test.
4279
4280 PR libstdc++/88066
4281 * include/backward/hash_map: Use <> for includes not "".
4282 * include/backward/hash_set: Likewise.
4283 * include/backward/strstream: Likewise.
4284 * include/tr1/bessel_function.tcc: Likewise.
4285 * include/tr1/exp_integral.tcc: Likewise.
4286 * include/tr1/legendre_function.tcc: Likewise.
4287 * include/tr1/modified_bessel_func.tcc: Likewise.
4288 * include/tr1/riemann_zeta.tcc: Likewise.
4289
4290 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
4291
4292 * doc/xml/manual/allocator.xml: Link to table documenting evolution
4293 of extension allocators.
4294 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
4295 Document new headers in 7.2, 8.1 and 9.1 releases.
4296 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
4297 * doc/html/*: Regenerate.
4298
4299 2019-03-12 John David Anglin <dave.anglin@bell.net>
4300
4301 PR libstdc++/89461
4302 * testsuite/lib/libstdc++.exp: Locate libatomic.
4303 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
4304 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
4305 libatomic options.
4306 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
4307 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
4308 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
4309 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
4310
4311 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
4312
4313 PR libstdc++/89460
4314 * configure.ac: Check for sockatmark.
4315 * crossconfig.m4: Check for sockatmark.
4316 * config.h.in: Regenerate.
4317 * configure: Regenerate.
4318 * include/experimental/internet (address_v4::_S_hton): Rename
4319 overloaded functions to _S_hton_16 and _S_ntoh_16.
4320 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
4321 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
4322 * include/experimental/socket (basic_socket::at_mark): Check
4323 _GLIBCXX_HAVE_SOCKATMARK.
4324
4325 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
4326 const variables instead of macros.
4327
4328 PR libstdc++/89629
4329 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
4330 Use correct type for len_aligned.
4331 * testsuite/20_util/hash/89629.cc: New test.
4332
4333 2019-03-11 Jakub Jelinek <jakub@redhat.com>
4334
4335 PR libstdc++/89641
4336 * include/std/atomic (atomic<T>::store, atomic<T>::load,
4337 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
4338 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
4339 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
4340 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
4341 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
4342 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
4343 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
4344 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
4345 memory_order_seq_cst to int.
4346
4347 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
4348
4349 * doc/xml/manual/using.xml: Use link element instead of xref.
4350 * doc/html/*: Regenerate.
4351
4352 * include/bits/fs_path.h (path::format): Add fixed underlying type.
4353
4354 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
4355
4356 PR libstdc++/89477
4357 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
4358 parameters in deduction guides.
4359 * include/debug/multimap.h (multimap): Likewise.
4360 * include/debug/set.h (multimap): Likewise.
4361 * include/debug/multiset.h (multimap): Likewise.
4362 * include/debug/unordered_map (unordered_map): Likewise.
4363 (unordered_multimap): Likewise.
4364 * include/debug/unordered_set (unordered_set): Likewise.
4365 (unordered_multiset): Likewise.
4366
4367 PR libstdc++/89608
4368 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
4369 Invalidate all iterators in case of rehash.
4370 (unordered_multimap<>::_M_check_rehashed): Likewise.
4371 * include/debug/unordered_set
4372 (unordered_set<>::_M_check_rehashed): Likewise.
4373 (unordered_multiset<>::_M_check_rehashed): Likewise.
4374 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
4375
4376 2019-03-07 Andreas Schwab <schwab@suse.de>
4377
4378 * config/abi/post/riscv64-linux-gnu: New directory.
4379 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
4380
4381 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
4382
4383 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
4384 compile test to run. Fix typo.
4385
4386 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
4387 * doc/html/*: Regenerate.
4388
4389 P0356R5 Simplified partial function application
4390 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
4391 helpers for bind_front.
4392 (bind_front, __cpp_lib_bind_front): Define.
4393 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
4394
4395 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4396
4397 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
4398 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
4399 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
4400 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
4401
4402 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
4403
4404 PR libstdc++/86655 - std::assoc_legendre should not constrain
4405 the value of m (or x).
4406 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
4407 __sph_legendre): If degree > order Don't throw, return 0.
4408 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
4409 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
4410 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
4411 * testsuite/tr1/5_numerical_facilities/special_functions/
4412 02_assoc_legendre/pr86655.cc: New test.
4413 * testsuite/tr1/5_numerical_facilities/special_functions/
4414 22_sph_legendre/pr86655.cc: New test.
4415
4416 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
4417
4418 Rewrite variant.
4419 Also PR libstdc++/85517
4420 * include/std/variant (__do_visit): New.
4421 (__variant_cast): Likewise.
4422 (__variant_cookie): Likewise.
4423 (__erased_*): Remove.
4424 (_Variant_storage::_S_vtable): Likewise.
4425 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
4426 (_Variant_storage::__M_reset): Adjust.
4427 (__variant_construct): New.
4428 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
4429 __variant_construct.
4430 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
4431 (_Move_ctor_base::__M_destructive_copy): New.
4432 (_Move_ctor_base::__M_destructive_move): Adjust to use
4433 __variant_construct.
4434 (_Copy_assign_base::operator=): Adjust to use __do_visit.
4435 (_Copy_assign_alias): Adjust to check both copy assignment
4436 and copy construction for triviality.
4437 (_Move_assign_base::operator=): Adjust to use __do_visit.
4438 (_Multi_array): Add support for visitors that accept and return
4439 a __variant_cookie.
4440 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
4441 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
4442 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
4443 a __variant_cookie temporary for a variant that is valueless and..
4444 (__gen_vtable_impl::__visit_invoke): ..adjust here.
4445 (__gen_vtable::_Array_type): Conditionally make space for
4446 the __variant_cookie visitor case.
4447 (__variant_construct_by_index): New.
4448 (get_if): Adjust to use std::addressof.
4449 (relops): Adjust to use __do_visit.
4450 (variant): Add __variant_cast and __variant_construct_by_index
4451 as friends.
4452 (variant::emplace): Use _M_reset() and __variant_construct_by_index
4453 instead of self-destruction.
4454 (variant::swap): Adjust to use __do_visit.
4455 (visit): Reimplement in terms of __do_visit.
4456 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
4457 * testsuite/20_util/variant/compile.cc: Adjust.
4458 * testsuite/20_util/variant/run.cc: Likewise.
4459
4460 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4461
4462 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
4463 constant.
4464 * testsuite/experimental/feat-char8_t.cc: Likewise.
4465
4466 * include/std/type_traits [C++20] (is_bounded_array)
4467 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
4468 Define.
4469 * testsuite/20_util/is_bounded_array/requirements/
4470 explicit_instantiation.cc: New test.
4471 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
4472 test.
4473 * testsuite/20_util/is_bounded_array/value.cc: New test.
4474 * testsuite/20_util/is_unbounded_array/requirements/
4475 explicit_instantiation.cc: New test.
4476 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
4477 * test.
4478 * testsuite/20_util/is_unbounded_array/value.cc: New test.
4479
4480 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
4481 Add constexpr.
4482 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
4483
4484 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
4485
4486 * include/c_compatibility/math.h [C++20] (lerp): Add using
4487 declaration.
4488 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
4489 (__lerp): Define function template to implement lerp.
4490 (lerp(float, float, float), lerp(double, double, double))
4491 (lerp(long double, long double, long double)): Define for C++20.
4492 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
4493 (midpoint(T, T), midpoint(T*, T*)): Define.
4494 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
4495 * testsuite/26_numerics/lerp.cc: New test.
4496 * testsuite/26_numerics/midpoint/floating.cc: New test.
4497 * testsuite/26_numerics/midpoint/integral.cc: New test.
4498 * testsuite/26_numerics/midpoint/pointer.cc: New test.
4499
4500 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
4501
4502 PR libstdc++/88996 Implement P0439R0
4503 Make std::memory_order a scoped enumeration.
4504 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
4505 add variables for the old enumerators. Adjust calls.
4506 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
4507 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
4508
4509 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
4510
4511 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
4512 directive.
4513
4514 * include/std/memory_resource (polymorphic_allocator): Add default
4515 template argument for C++20.
4516 (polymorphic_allocator::allocate_bytes)
4517 (polymorphic_allocator::deallocate_bytes)
4518 (polymorphic_allocator::allocate_object)
4519 (polymorphic_allocator::deallocate_object)
4520 (polymorphic_allocator::new_object)
4521 (polymorphic_allocator::delete_object): New member functions for
4522 C++20.
4523 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
4524 test.
4525
4526 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
4527
4528 PR libstdc++/89562
4529 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
4530 mode for mingw.
4531
4532 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
4533
4534 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
4535 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
4536
4537 * include/std/memory (uses_allocator_construction_args): New set of
4538 overloaded functions.
4539 (make_obj_using_allocator, uninitialized_construct_using_allocator):
4540 New functions.
4541 * include/std/memory_resource (polymorphic_allocator::construct)
4542 [__cplusplus > 201703l]: Replace all overloads with a single function
4543 using uses_allocator_construction_args.
4544 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
4545 test.
4546 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
4547
4548 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
4549
4550 PR libstdc++/89466
4551 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
4552 stylesheet directories before check for xsltproc. Try to use
4553 xmlcatalog to find local stylesheet directory before trying hardcoded
4554 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
4555 check to look for the same stylesheet as doc/Makefile.am uses. Don't
4556 use xsltproc if xmlcatalog fails to find a local stylesheet.
4557 * configure.ac: Check for xmlcatalog.
4558 * Makefile.in: Regenerate.
4559 * configure: Likewise.
4560 * doc/Makefile.in: Likewise.
4561 * include/Makefile.in: Likewise.
4562 * libsupc++/Makefile.in: Likewise.
4563 * po/Makefile.in: Likewise.
4564 * python/Makefile.in: Likewise.
4565 * src/Makefile.in: Likewise.
4566 * src/c++11/Makefile.in: Likewise.
4567 * src/c++17/Makefile.in: Likewise.
4568 * src/c++98/Makefile.in: Likewise.
4569 * src/filesystem/Makefile.in: Likewise.
4570 * testsuite/Makefile.in: Likewise.
4571
4572 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
4573
4574 PR libstdc++/89477
4575 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
4576 container deduction guides.
4577 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
4578 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
4579 parameters in deduction guides.
4580 * include/bits/stl_multimap.h (multimap): Likewise.
4581 * include/bits/stl_multiset.h (multiset): Likewise.
4582 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
4583 * include/bits/stl_set.h (set): Likewise.
4584 * include/bits/stl_stack.h (stack): Likewise.
4585 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4586 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
4587 constrain parameters in deduction guides.
4588 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4589 Likewise.
4590 * testsuite/23_containers/map/cons/deduction.cc: Test additional
4591 deduction cases.
4592 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4593 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4594 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
4595 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4596 Likewise.
4597 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4598 Likewise.
4599 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4600
4601 PR libstdc++/89416
4602 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
4603 to class template and partial specialization using void_t.
4604 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4605
4606 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
4607
4608 PR libstdc++/89416
4609 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
4610 copy and move members public.
4611
4612 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
4613
4614 * include/std/type_traits (__underlying_type_impl): New helper to
4615 make underlying_type SFINAE-friendly.
4616 (underlying_type): Derive from __underlying_type_impl.
4617 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
4618 test.
4619
4620 PR libstdc++/89446
4621 * include/bits/char_traits.h (__constant_char_array): Check index is
4622 in range before dereferencing.
4623 (char_traits<char>::compare, char_traits<char>::find)
4624 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
4625 immediately if n is zero.
4626 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
4627 Remove workarounds for PR 67026.
4628 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
4629 New test.
4630 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
4631 New test.
4632
4633 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4634
4635 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
4636 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4637
4638 2019-02-22 Jakub Jelinek <jakub@redhat.com>
4639
4640 PR libstdc++/89402
4641 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
4642 type to std::size_t and argument to type to long double.
4643
4644 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4645
4646 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
4647 * config/abi/post/sparc64-linux-gnu: New directory.
4648 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
4649 * config/abi/post/sparc64-linux-gnu/32: New directory.
4650 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
4651
4652 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4653
4654 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
4655 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
4656 test.
4657
4658 2019-02-22 Tom Honermann <tom@honermann.net>
4659
4660 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
4661 printers for u8string and u8string_view.
4662
4663 2019-02-22 Tom Honermann <tom@honermann.net>
4664
4665 * testsuite/18_support/byte/ops.cc: Validate
4666 std::to_integer<char8_t>, std::to_integer<char16_t>, and
4667 std::to_integer<char32_t>.
4668 * testsuite/18_support/numeric_limits/dr559.cc: Validate
4669 std::numeric_limits<char8_t>.
4670 * testsuite/18_support/numeric_limits/lowest.cc: Validate
4671 std::numeric_limits<char8_t>::lowest().
4672 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
4673 std::numeric_limits<char8_t>::max_digits10.
4674 * testsuite/18_support/type_info/fundamental.cc: Validate
4675 typeinfo for char8_t.
4676 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
4677 std::from_chars with char8_t.
4678 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
4679 Validate explicit instantiation of std::hash<char8_t>.
4680 * testsuite/20_util/is_integral/value.cc: Validate
4681 std::is_integral<char8_t>.
4682 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
4683 Validate std::make_signed<char8_t>.
4684 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
4685 Validate u8string construction from char8_t sources.
4686 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
4687 std::pmr::u8string.
4688 * testsuite/21_strings/basic_string_view/operations/compare/
4689 char/70483.cc: Validate substr operations on u8string_view.
4690 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
4691 the u8string_view typedef is defined.
4692 * testsuite/21_strings/char_traits/requirements/
4693 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
4694 member functions.
4695 * testsuite/21_strings/char_traits/requirements/
4696 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
4697 constexpr member functions.
4698 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
4699 that the u8string typedef is defined.
4700 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
4701 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
4702 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
4703 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
4704 numbers.
4705 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
4706 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
4707 Likewise.
4708 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
4709 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4710 Validate std::atomic<char8_t>::is_always_lock_free
4711 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
4712 Update line numbers.
4713 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
4714 Likewise.
4715 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
4716 Likewise.
4717 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
4718 Validate std::experimental::pmr::u8string.
4719 * testsuite/experimental/string_view/typedefs.cc: Validate that the
4720 u8string_view typedef is defined.
4721 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
4722 char32_t to the typelists.
4723
4724 2019-02-22 Tom Honermann <tom@honermann.net>
4725
4726 * include/ext/typelist.h: Constrain a partial specialization of
4727 typelist::detail::append_ to only match chain<T1,T2>.
4728
4729 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4730
4731 PR libstdc++/89416
4732 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
4733 class template with class. Replace move and copy member types with
4734 member alias templates, so they are only instantiated when needed.
4735 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4736 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
4737 test for C++11/14/17 as well.
4738 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
4739 test.
4740
4741 2019-02-20 Jakub Jelinek <jakub@redhat.com>
4742
4743 PR libstdc++/89402
4744 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
4745 _GLIBCXX_PURE to the alias declaration.
4746
4747 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
4748
4749 * testsuite/21_strings/basic_string/literals/types.cc
4750 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
4751 * testsuite/21_strings/basic_string/literals/values.cc
4752 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4753 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
4754 potentially having different type.
4755 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
4756 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
4757 to char.
4758 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
4759 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
4760 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
4761 string literals only using basic character set.
4762 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
4763 u8 literals to char.
4764 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
4765 Test ATOMIC_CHAR8_T_LOCK_FREE.
4766 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
4767 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
4768 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
4769 * testsuite/experimental/string_view/literals/types.cc
4770 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
4771 literal.
4772 * testsuite/experimental/string_view/literals/values.cc
4773 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4774
4775 2019-02-19 Tom Honermann <tom@honermann.net>
4776
4777 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
4778 from char16_32_t.cc; validates numeric_limits<char8_t>.
4779 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
4780 test cloned from types.cc; validates operator""s for char8_t
4781 returns u8string.
4782 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
4783 test cloned from values.cc; validates construction and comparison
4784 of u8string values.
4785 * testsuite/21_strings/basic_string/requirements/
4786 /explicit_instantiation/char8_t/1.cc: New test cloned from
4787 char16_t/1.cc; validates explicit instantiation of
4788 basic_string<char8_t>.
4789 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4790 New test cloned from types.cc; validates operator""sv for char8_t
4791 returns u8string_view.
4792 * testsuite/21_strings/basic_string_view/literals/
4793 values-char8_t.cc: New test cloned from values.cc; validates
4794 construction and comparison of u8string_view values.
4795 * testsuite/21_strings/basic_string_view/requirements/
4796 explicit_instantiation/char8_t/1.cc: New test cloned from
4797 char16_t/1.cc; validates explicit instantiation of
4798 basic_string_view<char8_t>.
4799 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
4800 New test cloned from char16_t/65049.cc; validates that
4801 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
4802 * testsuite/21_strings/char_traits/requirements/char8_t/
4803 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
4804 that char_traits<char8_t> member typedefs are present and correct.
4805 * testsuite/21_strings/char_traits/requirements/
4806 explicit_instantiation/char8_t/1.cc: New test cloned from
4807 char16_t/1.cc; validates explicit instantiation of
4808 char_traits<char8_t>.
4809 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
4810 from char16_t.cc: validates
4811 codecvt<char16_t, char8_t, mbstate_t>.
4812 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
4813 from char32_t.cc: validates
4814 codecvt<char32_t, char8_t, mbstate_t>.
4815 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
4816 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
4817 codecvt<char32_t, char8_t, std::mbstate_t>.
4818 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
4819 test cloned from string.cc; validates filesystem::path construction
4820 from char8_t input.
4821 * testsuite/experimental/feat-char8_t.cc: New test; validates that
4822 the __cpp_lib_char8_t feature test macro is defined with the
4823 correct value.
4824 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
4825 New test cloned from string.cc; validates filesystem::path
4826 construction from char8_t input.
4827 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
4828 test cloned from types.cc; validates operator""sv for char8_t
4829 returns u8string_view.
4830 * testsuite/experimental/string_view/literals/values-char8_t.cc:
4831 New test cloned from values.cc; validates construction and
4832 comparison of u8string_view values.
4833 * testsuite/experimental/string_view/requirements/
4834 explicit_instantiation/char8_t/1.cc: New test cloned from
4835 char16_t/1.cc; validates explicit instantiation of
4836 basic_string_view<char8_t>.
4837 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
4838 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
4839 enabled.
4840
4841 2019-02-19 Tom Honermann <tom@honermann.net>
4842
4843 P0482R5 char8_t: Standard library support
4844 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
4845 typeinfo symbols for char8_t.
4846 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
4847 (GLIBCXX_3.4.26): Add symbols for specializations of
4848 numeric_limits and codecvt that involve char8_t.
4849 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
4850 * include/bits/atomic_base.h: Add atomic_char8_t.
4851 * include/bits/basic_string.h: Add std::hash<u8string> and
4852 operator""s(const char8_t*, size_t).
4853 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
4854 __cpp_lib_char8_t.
4855 * include/bits/char_traits.h: Add char_traits<char8_t>.
4856 * include/bits/codecvt.h: Add
4857 codecvt<char16_t, char8_t, mbstate_t>,
4858 codecvt<char32_t, char8_t, mbstate_t>,
4859 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4860 codecvt_byname<char32_t, char8_t, mbstate_t>.
4861 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
4862 recognize char8_t as an integral type.
4863 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
4864 char8_t.
4865 (path::u8string): Return std::u8string when char8_t support is
4866 enabled.
4867 (path::generic_u8string): Likewise.
4868 (path::_S_convert): Handle conversion from char8_t input.
4869 (path::_S_str_convert): Likewise.
4870 * include/bits/functional_hash.h: Add hash<char8_t>.
4871 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4872 char8_t.
4873 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4874 for new char8_t specializations.
4875 * include/bits/localefwd.h: Add missing declarations of
4876 codecvt<char16_t, char, mbstate_t> and
4877 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4878 codecvt<char16_t, char8_t, mbstate_t> and
4879 codecvt<char32_t, char8_t, mbstate_t>.
4880 * include/bits/postypes.h: Add u8streampos
4881 * include/bits/stringfwd.h: Add declarations of
4882 char_traits<char8_t> and u8string.
4883 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4884 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4885 Recognize char8_t.
4886 (path::u8string): Return std::u8string when char8_t support is
4887 enabled.
4888 (path::generic_u8string): Likewise.
4889 (path::_S_convert): Handle conversion from char8_t input.
4890 (path::_S_str_convert): Likewise.
4891 * include/experimental/string: Add u8string.
4892 * include/experimental/string_view: Add u8string_view,
4893 hash<experimental::u8string_view>, and
4894 operator""sv(const char8_t*, size_t).
4895 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4896 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4897 as a character type.
4898 * include/std/limits: Add numeric_limits<char8_t>.
4899 * include/std/string_view: Add u8string_view,
4900 hash<experimental::u8string_view>, and
4901 operator""sv(const char8_t*, size_t).
4902 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4903 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4904 * libsupc++/atomic_lockfree_defines.h: Define
4905 ATOMIC_CHAR8_T_LOCK_FREE.
4906 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4907 codecvt.cc and limits.cc so that char8_t specializations of
4908 numeric_limits and codecvt and emitted.
4909 * src/c++11/Makefile.in: Likewise.
4910 * src/c++11/codecvt.cc: Define members of
4911 codecvt<char16_t, char8_t, mbstate_t>,
4912 codecvt<char32_t, char8_t, mbstate_t>,
4913 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4914 codecvt_byname<char32_t, char8_t, mbstate_t>.
4915 * src/c++11/limits.cc: Define members of
4916 numeric_limits<char8_t>.
4917 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4918 locale_init.cc and localename.cc.
4919 * src/c++98/Makefile.in: Likewise.
4920 * src/c++98/locale_init.cc: Add initialization for the
4921 codecvt<char16_t, char8_t, mbstate_t> and
4922 codecvt<char32_t, char8_t, mbstate_t> facets.
4923 * src/c++98/localename.cc: Likewise.
4924 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4925
4926 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4927
4928 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4929 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4930 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4931
4932 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4933
4934 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4935 * doc/html/*: Regenerate.
4936
4937 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4938 * doc/html/*: Regenerate.
4939
4940 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4941 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4942 allocator type in is_constructible checks.
4943 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4944 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4945 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4946 problematic type from LWG 2586 discussion.
4947 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4948 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4949
4950 * configure.ac: Check for C11 timespec_get function.
4951 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4952 (openbsd): Likewise
4953 * config.h.in: Regenerate.
4954 * configure: Regenerate.
4955 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4956 std for C++17 and up.
4957
4958 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4959 * include/bits/stl_queue.h
4960 (priority_queue(const Compare&, const Container&, const Alloc&))
4961 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4962 make_heap.
4963 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4964
4965 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4966 * include/bits/stl_queue.h (queue, priority_queue): Add static
4967 assertions to enforce LWG 2566 requirement on value_type.
4968 * include/bits/stl_stack.h (stack): Likewise.
4969
4970 PR middle-end/89303
4971 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4972
4973 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4974 * include/bits/std_abs.h: Add comment about LWG 2735.
4975 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4976
4977 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4978
4979 PR libstdc++/89345
4980 * include/std/version [__cpp_impl_destroying_delete]
4981 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4982 * libsupc++/new [__cpp_impl_destroying_delete]
4983 (__cpp_lib_destroying_delete): Likewise.
4984 (destroying_delete_t, destroying_delete): Likewise, but define even
4985 when __cpp_impl_destroying_delete is not defined.
4986 * testsuite/18_support/destroying_delete.cc: New test.
4987
4988 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4989
4990 PR libstdc++/89023
4991 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4992 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4993 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4994 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4995
4996 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4997
4998 PR libstdc++/71044
4999 * include/bits/fs_path.h (path::has_root_name)
5000 (path::has_root_directory, path::has_root_path)
5001 (path::has_relative_path, path::has_parent_path)
5002 (path::has_filename, path::has_stem, path::has_extension)
5003 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
5004 noexcept.
5005 * src/c++17/fs_path.cc (path::has_root_name)
5006 (path::has_root_directory, path::has_root_path)
5007 (path::has_relative_path, path::has_parent_path)
5008 (path::has_filename, path::_M_find_extension): Add noexcept.
5009
5010 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
5011
5012 PR libstdc++/89102 (partial)
5013 * include/std/type_traits (common_type<>): Define.
5014 (common_type<T>): Derive from common_type<T, T>.
5015 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
5016 Test zero-length template argument list.
5017 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
5018 Test additional single argument cases.
5019 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
5020 Adjust expected error.
5021
5022 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
5023
5024 PR libstdc++/89128
5025 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
5026 guides.
5027 * include/bits/stl_stack.h (stack): Likewise.
5028 * testsuite/23_containers/priority_queue/deduction.cc: New test.
5029 * testsuite/23_containers/queue/deduction.cc: New test.
5030 * testsuite/23_containers/stack/deduction.cc: New test.
5031
5032 PR libstdc++/89194
5033 * include/std/type_traits (__is_convertible_helper)
5034 (__is_convertible_helper<_From, _To, false>): Revert changes to
5035 support is_nothrow_convertible.
5036 (__is_nt_convertible_helper): New helper.
5037 (is_nothrow_convertible): Use __is_nt_convertible_helper.
5038
5039 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
5040 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
5041
5042 PR libstdc++/89130
5043 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
5044 __is_alloc_insertable_impl. Replace single type member with two
5045 members, one for each of copy and move insertable.
5046 (__is_move_insertable): New trait for internal use.
5047 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
5048 (vector::_S_nothrow_relocate(true_type)): New functions to
5049 conditionally check if __relocate_a can throw.
5050 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
5051 on __is_move_insertable.
5052 (vector::_S_do_relocate): New overloaded functions to conditionally
5053 call __relocate_a.
5054 (vector::_S_relocate): New function that dispatches to _S_do_relocate
5055 based on _S_use_relocate.
5056 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5057 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
5058 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
5059
5060 PR libstdc++/89090
5061 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
5062 parameter unnamed. Add message to static assertion.
5063 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5064 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
5065 in C++11 code.
5066
5067 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
5068
5069 PR libstdc++/87106
5070 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
5071 Rename...
5072 (__is_bitwise_relocatable): ... to this.
5073 (__relocate_a_1): Adapt.
5074 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
5075 (__is_bitwise_relocatable): ... to this.
5076
5077 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
5078
5079 PR libstdc++/89117
5080 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
5081 final component as well as from _M_pathname. Append the dot using
5082 operator+= instead of only to _M_pathname.
5083 (path::_M_find_extension): Reformat slightly.
5084 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5085 Add more test cases.
5086
5087 2019-01-30 Ulrich Drepper <drepper@redhat.com>
5088
5089 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
5090
5091 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
5092
5093 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
5094 constexpr specifiers from arg and proj.
5095
5096 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
5097 __shared_ptr instantiations used by gcc4-compatible ABI.
5098
5099 * include/experimental/forward_list (experimental::erase): Qualify
5100 call to erase_if.
5101 * include/experimental/list (experimental::erase): Likewise.
5102 * include/std/forward_list (std::erase): Likewise.
5103 * include/std/list (std::erase): Likewise.
5104
5105 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
5106 C++2a.
5107 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
5108 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
5109 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
5110 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
5111 * testsuite/ext/array_allocator/26875.cc: Likewise.
5112 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
5113 * testsuite/util/replacement_memory_operators.h: Likewise.
5114 * testsuite/util/testsuite_allocator.h: Likewise.
5115
5116 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
5117 normal mode vector, even for debug mode.
5118 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
5119 Define alias template for normal mode vector.
5120
5121 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
5122
5123 PR libstdc++/68737
5124 * config/locale/generic/c_locale.h (__convert_from_v)
5125 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5126 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5127 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
5128 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5129
5130 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
5131
5132 PR libstdc++/88840
5133 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
5134 data member with static member function _S_use_relocate().
5135 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5136 (vector::_M_default_append): Use _S_use_relocate() instead of
5137 __use_relocate.
5138
5139 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
5140 sign of results.
5141
5142 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
5143
5144 PR libstdc++/88740
5145 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
5146 write to stderr instead of using printf.
5147
5148 2019-01-21 Jakub Jelinek <jakub@redhat.com>
5149
5150 PR libstdc++/86590
5151 * include/bits/char_traits.h (__constant_string_p,
5152 __constant_char_array_p): Use __builtin_is_constant_evaluated if
5153 available.
5154
5155 2019-01-20 Ulrich Drepper <drepper@redhat.com>
5156
5157 Implement C++20 P0600r1.
5158 * include/backward/hash_map: Add nodiscard attribute to empty.
5159 * include/backward/hash_set: Likewise.
5160 * backward/hashtable.h: Likewise.
5161 * include/bits/basic_string.h: Likewise.
5162 * include/bits/forward_list.h: Likewise.
5163 * include/bits/hashtable.h: Likewise.
5164 * include/bits/regex.h: Likewise.
5165 * include/bits/stl_deque.h: Likewise.
5166 * include/bits/stl_list.h: Likewise.
5167 * include/bits/stl_map.h: Likewise.
5168 * include/bits/stl_multimap.h: Likewise.
5169 * include/bits/stl_multiset.h: Likewise.
5170 * include/bits/stl_queue.h: Likewise.
5171 * include/bits/stl_set.h: Likewise.
5172 * include/bits/stl_stack.h: Likewise.
5173 * include/bits/stl_tree.h: Likewise.
5174 * include/bits/stl_vector.h: Likewise.
5175 * include/bits/unordered_map.h: Likewise.
5176 * include/bits/unordered_set.h: Likewise.
5177 * include/debug/array: Likewise.
5178 * include/experimental/any: Likewise.
5179 * include/experimental/bits/fs_path.h: Likewise.
5180 * include/experimental/internet: Likewise.
5181 * include/experimental/string_view: Likewise.
5182 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
5183 Likewise.
5184 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
5185 Likewise.
5186 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
5187 Likewise.
5188 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
5189 Likewise.
5190 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
5191 Likewise.
5192 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
5193 Likewise.
5194 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
5195 Likewise.
5196 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
5197 Likewise.
5198 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5199 info_fn_imps.hpp: Likewise.
5200 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5201 left_child_next_sibling_heap_.hpp: Likewise.
5202 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
5203 Likewise.
5204 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
5205 Likewise.
5206 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
5207 Likewise.
5208 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
5209 Likewise.
5210 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
5211 Likewise.
5212 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
5213 Likewise.
5214 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
5215 Likewise.
5216 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
5217 * include/ext/pb_ds/trie_policy.hpp: Likewise.
5218 * include/ext/rope: Likewise.
5219 * include/ext/slist: Likewise.
5220 * include/ext/vstring.h: Likewise.
5221 * include/profile/array: Likewise.
5222 * include/std/array: Likewise.
5223 * include/tr1/array: Likewise.
5224 * include/tr1/hashtable.h: Likewise.
5225 * include/tr1/regex: Likewise.
5226 * include/tr2/dynamic_bitset: Likewise.
5227 * include/bits/alloc_traits.h: Add nodiscard attribute to
5228 allocate.
5229 * include/experimental/memory_resource: Likewise.
5230 * include/ext/alloc_traits.h: Likewise.
5231 * include/ext/array_allocator.h: Likewise.
5232 * include/ext/bitmap_allocator.h: Likewise.
5233 * include/ext/debug_allocator.h: Likewise.
5234 * include/ext/extptr_allocator.h: Likewise.
5235 * include/ext/mt_allocator.h: Likewise.
5236 * include/ext/new_allocator.h: Likewise.
5237 * include/ext/pool_allocator.h: Likewise.
5238 * include/ext/throw_allocator.h: Likewise.
5239 * include/std/scoped_allocator: Likewise.
5240 * libsupc++/eh_alloc.cc: Likewise.
5241 * include/std/future: Add nodiscard attribute to async.
5242 * libsupc++/new: Add nodiscard attribute to new.
5243
5244 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
5245
5246 PR libstdc++/87514
5247 PR libstdc++/87520
5248 PR libstdc++/88782
5249 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
5250 * include/bits/shared_ptr.h
5251 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
5252 (allocate_shared): Change to use new tag type.
5253 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
5254 Declare new member function.
5255 (_Sp_alloc_shared_tag): Define new type.
5256 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
5257 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
5258 _Sp_make_shared_tag::_S_eq to check type_info.
5259 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
5260 Constrain to prevent being called with _Sp_alloc_shared_tag.
5261 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
5262 Replace constructor with ...
5263 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
5264 reference parameter so address of the new object can be returned to
5265 the caller. Obtain the allocator from the tag type.
5266 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
5267 constructor with ...
5268 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
5269 to the __shared_count constructor.
5270 (__allocate_shared): Change to use new tag type.
5271 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
5272
5273 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
5274
5275 * src/c++17/fs_ops.cc
5276 (equivalent(const path&, const path&, error_code&))
5277 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
5278 compare files instead of relying on incomplete info returned by stat.
5279
5280 PR libstdc++/88884
5281 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
5282 if the path is already absolute.
5283 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
5284 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
5285
5286 PR libstdc++/88881
5287 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
5288 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
5289 of filesystem::exists.
5290 (create_directories(const path&, error_code&)): Add assertions.
5291 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
5292 Add workaround for bug in _wstat for paths with trailing slash.
5293 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
5294 for expected behaviour on mingw.
5295 * testsuite/experimental/filesystem/operations/create_directories.cc:
5296 Likewise.
5297 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
5298 "TMP" instead of "TMPDIR" and clean environment before each test. Do
5299 not test permissions on mingw targets.
5300
5301 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
5302
5303 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
5304 constructors and open members taking wide strings. Fix patterns for
5305 filesystem::path members to match wstring_view parameters. Add
5306 exports for shared_ptr members used by directory iterators.
5307 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
5308 error code parameter if the file doesn't exist.
5309 * src/filesystem/ops.cc (remove(const path&, error_code&)):
5310 Likewise.
5311 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
5312 values for mingw targets, where "/" is not an absolute path. Do not
5313 test symlinks on mingw targets.
5314 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
5315 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
5316 on mingw targets.
5317 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5318 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
5319 that each component of the path is created.
5320 * testsuite/experimental/filesystem/operations/create_directories.cc:
5321 Likewise.
5322 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
5323 permissions on mingw targets.
5324 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
5325 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5326 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
5327 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
5328 mingw targets.
5329 * testsuite/experimental/filesystem/operations/permissions.cc:
5330 Likewise.
5331 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
5332 symlinks or permissions on mingw targets.
5333 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
5334 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
5335 symlinks on mingw targets.
5336 * testsuite/experimental/filesystem/operations/remove_all.cc:
5337 Likewise.
5338 * testsuite/27_io/filesystem/operations/status.cc: Do not test
5339 permissions on mingw targets.
5340 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
5341 test symlinks on mingw targets.
5342 * testsuite/experimental/filesystem/operations/space.cc: Fix test
5343 for mingw targets.
5344
5345 2019-02-14 Ulrich Drepper <drepper@redhat.com>
5346
5347 PR libstdc++/88738
5348 Warn about unused comparisons of shared_ptr/unique_ptr
5349 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
5350 * include/bits/shared_ptr.h: Use it for operator ==, !=,
5351 <, <=, >, >= for shared_ptr.
5352 * include/bits/unique_ptr.h: Likewise for unique_ptr.
5353
5354 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
5355
5356 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
5357 as 201611L, because P0497R0 changes are supported.
5358 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
5359
5360 * include/bits/erase_if.h [__cplusplus > 201703L]
5361 (__cpp_lib_erase_if): Only define for C++2a.
5362 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5363 (__cpp_lib_null_iterators): Define.
5364 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5365 (__cpp_lib_null_iterators): Define.
5366 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
5367
5368 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
5369 status.
5370 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
5371 Define.
5372 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
5373 changes are supported.
5374 * include/std/optional (__cpp_lib_optional): Likewise.
5375 * include/std/variant (__cpp_lib_variant): Likewise.
5376 * include/std/version [!__STRICT_ANSI__]
5377 (__cpp_lib_uncaught_exceptions): Define as long integer.
5378 [__cplusplus >= 201703L] (__cpp_lib_any)
5379 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
5380 (__cpp_lib_variant): Define for C++17.
5381 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
5382 as long integer.
5383 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
5384 integer.
5385
5386 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
5387
5388 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
5389
5390 PR libstdc++/88811
5391 PR libstdc++/83306
5392 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
5393 before second path.
5394 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
5395 test.
5396
5397 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5398
5399 * doc/xml/manual/intro.xml: Include new section.
5400 * doc/xml/manual/status_cxx2017.xml: Document more
5401 implementation-defined properties of the library.
5402 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
5403 * doc/html/*: Regenerate.
5404
5405 * include/bits/refwrap.h [__cplusplus > 201703L]
5406 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
5407 (_Reference_wrapper_base_memfun): Do not define for C++2a.
5408 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
5409 for C++2a.
5410 (reference_wrapper::operator()): Add static assertion.
5411 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
5412
5413 * include/std/chrono (duration_values::zero(), duration_values::min())
5414 (duration_values::max()): Add noexcept.
5415 (duration::zero(), duration::min(), duration::max()): Likewise.
5416 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
5417 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
5418 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
5419
5420 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
5421
5422 2019-01-11 Jakub Jelinek <jakub@redhat.com>
5423
5424 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
5425 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
5426
5427 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5428
5429 PR libstdc++/88802
5430 * include/bits/functional_hash.h (hash<nullptr_t>): Define
5431 specialization for C++17 (P0513R0, LWG 2817).
5432 * testsuite/20_util/hash/nullptr.cc: New test.
5433
5434 PR libstdc++/88125
5435 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
5436 pattern for std::basic_stringbuf::str().
5437
5438 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
5439 basic_ostream::operator<< patterns.
5440
5441 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5442
5443 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
5444 test failures on targets with 32-bit time_t.
5445
5446 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
5447 * include/std/deque: Likewise.
5448 * include/std/forward_list: Likewise.
5449 * include/std/list: Likewise.
5450 * include/std/string: Likewise.
5451 * include/std/vector: Likewise.
5452 * include/std/version: Likewise.
5453 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
5454 * testsuite/23_containers/deque/erasure.cc: Likewise.
5455 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5456 * testsuite/23_containers/list/erasure.cc: Likewise.
5457 * testsuite/23_containers/map/erasure.cc: Likewise.
5458 * testsuite/23_containers/set/erasure.cc: Likewise.
5459 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5460 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5461 * testsuite/23_containers/vector/erasure.cc: Likewise.
5462
5463 * include/experimental/internet [AI_NUMERICSERV]
5464 (resolver_base::numeric_service): Define conditionally.
5465 * testsuite/experimental/net/internet/resolver/base.cc: Test it
5466 conditionally.
5467 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
5468 Likewise.
5469
5470 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
5471 Jonathan Wakely <jwakely@redhat.com>
5472
5473 Implement LWG 2221
5474 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
5475 (GLIBCXX_3.4.26): Add new exports.
5476 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
5477 correct list of sources.
5478 * include/Makefile.in: Regenerate.
5479 * include/std/ostream (operator<<(nullptr_t)): New member function.
5480 * src/c++17/ostream-inst.cc: New file.
5481 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
5482 test.
5483
5484 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5485
5486 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
5487 of the source file containing the caller.
5488 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
5489 directories created by test.
5490 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5491 Likewise.
5492 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
5493 Likewise.
5494 * testsuite/experimental/filesystem/iterators/
5495 recursive_directory_iterator.cc: Likewise.
5496
5497 2019-01-10 Jakub Jelinek <jakub@redhat.com>
5498
5499 PR tree-optimization/88775
5500 * include/bits/stl_function.h (greater<_Tp*>::operator(),
5501 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
5502 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
5503 instead of __builtin_constant_p if available. Don't bother with
5504 the pointer comparison in C++11 and earlier.
5505
5506 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
5507
5508 PR other/16615
5509
5510 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
5511 with "cannot".
5512
5513 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
5514
5515 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
5516 for filesystem::path. Give variables more distinctive names.
5517
5518 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
5519 member function to perform non-trivial assignment.
5520 (_Optional_payload_base::_M_move_assign): Likewise.
5521 (_Optional_payload<T, true, false, true>::operator=)
5522 (_Optional_payload<T, true, true, false>::operator=)
5523 (_Optional_payload<T, true, false, false>::operator=): Call
5524 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
5525
5526 PR libstdc++/88204
5527 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
5528 test std::complex<long double> if long double format is IBM128.
5529 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
5530 Likewise.
5531
5532 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5533
5534 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
5535 for old std::unique_ptr layout.
5536 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
5537 to become valueless. Add filesystem::path tests.
5538
5539 PR libstdc++/87855
5540 * include/std/optional (_Optional_payload_base): New class template
5541 for common code hoisted from _Optional_payload specializations. Use
5542 a template for the union, to allow a partial specialization for
5543 types with non-trivial destructors. Add constructors for in-place
5544 initialization to the union.
5545 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
5546 to perform non-trivial copy construction, instead of relying on
5547 non-standard copy elision in a delegating constructor.
5548 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
5549 non-trivial move construction.
5550 (_Optional_payload): Derive from _Optional_payload_base and use it
5551 for everything except the non-trivial assignment operators, which are
5552 defined as needed.
5553 (_Optional_payload<false, C, M>): Derive from the specialization
5554 _Optional_payload<true, false, false> and add a destructor.
5555 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
5556 Forward to corresponding members of _Optional_payload.
5557 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
5558 Hoist common members from _Optional_base.
5559 (_Optional_base): Make all members and base class public.
5560 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
5561 _Optional_base_impl.
5562 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
5563 support for new std::optional layout.
5564 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
5565
5566 PR libstdc++/88066
5567 * include/bits/locale_conv.h: Use <> for includes not "".
5568 * include/ext/random: Likewise.
5569 * include/ext/vstring.h: Likewise.
5570
5571 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5572
5573 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
5574 (GLIBCXX_3.4.21): Likewise.
5575
5576 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5577
5578 PR libstdc++/88749
5579 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
5580 to match the one that controls whether utimbuf and utime are declared.
5581
5582 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
5583
5584 PR libstdc++/87787
5585 * include/bits/char_traits.h (char_traits::move): Do not pass null
5586 pointers to memmove.
5587 * include/bits/locale_facets.h
5588 (ctype<char>::widen(const char*, const char*, char*)): Do not
5589 pass null pointers to memcpy.
5590 (ctype<char>::narrow(const char*, const char*, char, char*)):
5591 Likewise.
5592 (ctype<char>::do_widen(const char*, const char*, char*)):
5593 Likewise.
5594 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
5595 Likewise.
5596
5597 * doc/xml/manual/spine.xml: Update copyright years.
5598 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
5599 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
5600 for C++17 filesystem library.
5601 * doc/html/*: Regenerate.
5602
5603 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
5604 * config.h.in: Regenerate.
5605 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
5606 alphabetically and add missing entries for copy_symlink,
5607 hard_link_count, rename, and resize_file.
5608 * configure: Regenerate.
5609 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
5610 used unconditionally.
5611 * src/filesystem/ops-common.h (__gnu_posix::truncate)
5612 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
5613 supports truncating to zero length.
5614 * testsuite/27_io/filesystem/operations/all.cc: New test.
5615 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
5616
5617 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
5618
5619 PR libstdc++/86756
5620 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
5621 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
5622 * config.h.in: Regenerate.
5623 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
5624 remaining std::filesystem types and functions.
5625 * configure: Regenerate.
5626 * src/c++17/Makefile.am: Add C++17 filesystem sources.
5627 * src/c++17/Makefile.in: Regenerate.
5628 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
5629 here, and change name of included file.
5630 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
5631 here, and change name of included file.
5632 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
5633 path to dir-common.h.
5634 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
5635 path to ops-common.h. Disable -Wunused-parameter warnings.
5636 (internal_file_clock): Define unconditionally.
5637 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
5638 define.
5639 (do_copy_file, do_space): Move definitions to ops.common.h.
5640 (copy, file_size, hard_link_count, last_write_time, space): Only
5641 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
5642 report an error.
5643 (last_write_time, read_symlink): Remove unused attributes from
5644 parameters.
5645 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
5646 * src/filesystem/Makefile.in: Regenerate.
5647 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
5648 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
5649 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
5650 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
5651 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
5652 dummy types and functions instead of using #error.
5653 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
5654 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
5655 in terms of stat.
5656 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
5657 (do_copy_file, do_space): Move definitions here from std-ops.cc.
5658 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
5659 to account for new namespace.
5660 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
5661 -lstdc++fs from dg-options.
5662 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
5663 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
5664 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
5665 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
5666 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
5667 Likewise.
5668 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
5669 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5670 Likewise.
5671 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
5672 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
5673 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
5674 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
5675 * testsuite/27_io/filesystem/operations/create_directories.cc:
5676 Likewise.
5677 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
5678 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
5679 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
5680 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
5681 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
5682 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
5683 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5684 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
5685 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
5686 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
5687 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
5688 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
5689 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
5690 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
5691 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
5692 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
5693 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
5694 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
5695 Likewise.
5696 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
5697
5698
5699 PR libstdc++/86756
5700 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
5701 typeinfo and vtables less greedy.
5702 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
5703 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
5704 * src/c++17/Makefile.in: Regenerate.
5705 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
5706 here, and change name of included file.
5707 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
5708 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
5709 from sources.
5710 * src/filesystem/Makefile.in: Regenerate.
5711 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
5712 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
5713 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
5714 from dg-options and remove dg-require-filesystem-ts.
5715 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
5716 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
5717 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
5718 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
5719 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5720 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5721 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5722 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
5723 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
5724 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
5725 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
5726 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
5727 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
5728 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
5729 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
5730 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
5731 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
5732 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
5733 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
5734 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
5735 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
5736 Likewise.
5737 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
5738 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
5739 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
5740 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
5741 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
5742 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
5743 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
5744 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
5745 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
5746 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
5747 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
5748 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
5749 Likewise.
5750 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
5751 Likewise.
5752 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5753 Likewise.
5754 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
5755 Likewise.
5756 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
5757 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
5758 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
5759 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
5760 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
5761 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
5762 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
5763 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
5764 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
5765 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
5766 Likewise.
5767 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
5768 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
5769 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
5770 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
5771 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
5772
5773 PR libstdc++/87431
5774 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
5775 Check is_trivially_copyable instead of is_scalar.
5776 (variant::emplace<N, Args>(Args&&...)): If construction of the new
5777 contained value can throw and its type is trivially copyable then
5778 construct into a temporary variant and move from it, to provide the
5779 strong exception safety guarantee.
5780 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
5781 Likewise.
5782 * testsuite/20_util/variant/87431.cc: New test.
5783 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
5784 conversion causes valueless state.
5785
5786 PR libstdc++/88607
5787 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
5788 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
5789 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
5790 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
5791 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
5792
5793 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
5794
5795 * include/bits/fs_fwd.h (__file_clock): Define new clock.
5796 (file_time_type): Redefine in terms of __file_clock.
5797 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
5798 overflow.
5799 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
5800 internal linkage.
5801 (internal_file_lock): New helper type for accessing __file_clock.
5802 (do_copy_file): Use internal_file_lock to convert system time to
5803 file_time_type.
5804 (last_write_time(const path&, error_code&)): Likewise.
5805 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
5806
5807 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
5808
5809 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
5810 for const member functions of std::basic_string.
5811 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
5812 in C++17.
5813 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
5814 Make non-standard constructor private.
5815 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
5816 Likewise.
5817 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
5818 explicit instantiations for C++17 as well as earlier dialects.
5819 * src/c++17/Makefile.am: Add new source files.
5820 * src/c++17/Makefile.in: Regenerate.
5821 * src/c++17/cow-string-inst.cc: New file defining explicit
5822 instantiations for basic_string member functions added in C++17.
5823 * src/c++17/string-inst.cc: Likewise.
5824
5825 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
5826 copy/move constructors for old std::basic_string.
5827 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
5828 (basic_string::reference, basic_string::const_reference): Define
5829 as plain references for C++11 and later.
5830 (basic_string::basic_string()): Put constructor body outside
5831 preprocessor conditional groups.
5832 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
5833 instead of copying it.
5834 (basic_string::basic_string(const basic_string&, const _Alloc&)):
5835 Define.
5836 (basic_string::basic_string(basic_string&&, const _Alloc&)):
5837 Define.
5838 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
5839 cases for old basic_string.
5840 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
5841 allocator-extended constructors unconditionally. Add extra members to
5842 allocator type when using old string ABI.
5843 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
5844 for old string ABI.
5845 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
5846
5847 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
5848 -fno-inline added to test flags.
5849
5850 * testsuite/21_strings/basic_string/requirements/
5851 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
5852
5853 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
5854 assertion failures with old std::string ABI.
5855
5856 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
5857 with ...
5858 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
5859 functions that will only erase elements at the end.
5860 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
5861 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
5862 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
5863 of erase(p, end()).
5864 (path::_List::pop_back()): Define.
5865 (path::_List::_M_erase_from(const_iterator)): Define.
5866 (path::operator/=(const path&)): Use pop_back to remove last component
5867 and _M_erase_from to remove multiple components.
5868 (path::_M_append(basic_string_view<value_type>)): Likewise.
5869 (path::operator+=(const path&)): Likewise.
5870 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5871 (path::remove_filename()): Likewise.
5872 (path::lexically_normal()): Use _List::_Impl iterators instead of
5873 path::iterator. Use pop_back to remove components from the end. Clear
5874 trailing filename, instead of using erase(const_iterator) to remove
5875 a non-final component.
5876 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5877 additional cases.
5878 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5879
5880 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5881 incorrect treatment of empty filename after trailing slash.
5882 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5883
5884 * testsuite/21_strings/basic_string/modifiers/assign/char/
5885 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5886 to test flags.
5887 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5888 move_assign_optim.cc: Likewise.
5889
5890 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5891 Jakub Jelinek <jakub@redhat.com>
5892
5893 PR libstdc++/88607
5894 * include/experimental/memory: Replace UTF-8 quote characters.
5895 * include/std/future: Replace UTF-8 "em dash" characters.
5896
5897 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5898
5899 PR libstdc++/88607
5900 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5901 * include/debug/forward_list: Likewise.
5902 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5903 character.
5904 * include/experimental/chrono: Likewise.
5905 * include/experimental/functional: Likewise.
5906 * include/experimental/ratio: Likewise.
5907 * include/experimental/system_error: Likewise.
5908 * include/experimental/tuple: Likewise.
5909 * include/experimental/type_traits: Likewise.
5910 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5911 * include/parallel/multiseq_selection.h: Likewise.
5912
5913 PR libstdc++/88681
5914 * config/abi/pre/gnu.ver: Add missing exports.
5915 * testsuite/22_locale/collate_byname/88681.cc: New test.
5916 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5917 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5918
5919 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5920
5921 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5922 initializer_list<value_type> and from input iterator ranges.
5923 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5924
5925 * testsuite/experimental/string_view/element_access/char/empty.cc:
5926 Fix year range in copyright header.
5927
5928 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5929
5930 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5931 Fix year range in copyright header.
5932
5933 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5934
5935 Update copyright years.
5936 \f
5937 Copyright (C) 2019 Free Software Foundation, Inc.
5938
5939 Copying and distribution of this file, with or without modification,
5940 are permitted in any medium without royalty provided the copyright
5941 notice and this notice are preserved.