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