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