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