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