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