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