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