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