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