1 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
4 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
6 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
8 * testsuite/18_support/51333.cc: New test.
10 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
12 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
13 to the Doxygen manual. Avoid a "here" link on the way.
14 Fix another broken link to Doxygen docblocks.
16 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
18 * include/std/bit (__cpp_lib_endian): Define.
19 * include/std/version (__cpp_lib_endian): Define.
20 * testsuite/26_numerics/endian/2.cc: New.
21 * testsuite/26_numerics/endian/3.cc: New.
22 * testsuite/26_numerics/endian/4.cc: New.
24 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
26 * testsuite/util/testsuite_iterators.h
27 (bidirectional_iterator_wrapper): Fix type comment.
28 (random_access_iterator_wrapper): Likewise.
30 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
32 * include/std/bit (endian): Move definition here as per P1612R1.
33 * include/std/type_traits (endian): Remove definition from here.
34 * testsuite/20_util/endian/1.cc: Rename to ...
35 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
37 2019-07-25 Martin Liska <mliska@suse.cz>
38 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
41 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
43 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
44 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
45 * testsuite/ext/new_allocator/check_new.cc: Likewise.
47 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
49 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
50 * testsuite/26_numerics/bit/bit.count/*: Here.
52 * include/std/bit (__rotl, __rotr): Change second parameter from
53 unsigned int to int and handle negative values.
54 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
55 parameter from unsigned int to int. Add nodiscard attribute.
56 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
57 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
59 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
60 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
63 * include/std/bit (__ceil2): Make unrepresentable results undefined,
64 as per P1355R2. Add debug assertion. Perform one left shift, not two,
65 so that out of range values cause undefined behaviour. Ensure that
66 shift will still be undefined if left operand is promoted.
67 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
68 unrepresentable values with checks that they are not core constant
70 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
72 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
74 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
75 sized deallocation size computation.
77 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
79 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
81 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
83 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
84 (~_Temporary_buffer()): Use latter.
85 (_Temporary_buffer(_FIterator, size_type)): Likewise.
87 2019-07-17 Andreas Schwab <schwab@suse.de>
89 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
91 2019-07-16 Jason Merrill <jason@redhat.com>
93 * include/std/memory (uses_allocator_construction_args): Add parens
96 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
98 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
100 * include/experimental/string_view (__detail::__idt): Remove.
101 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
102 Use __type_identity_t instead of __detail::__idt;
103 * include/std/string_view (__detail::__idt): Remove.
104 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
105 Use __type_identity_t instead of __detail::__idt;
106 * include/std/type_traits (__type_identity_t): New alias template.
108 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
109 and floating point atomics.
111 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
113 * doc/xml/manual/configure.xml: Improve documentation of
114 --enable-libstdcxx-time option.
116 * include/bits/atomic_base.h (__atomic_impl): New namespace for
117 wrappers around atomic built-ins.
118 (__atomic_float, __atomic_ref): New class templates for use as base
120 * include/std/atomic (atomic<float>, atomic<double>)
121 (atomic<long double>): New explicit specializations.
122 (atomic_ref): New class template.
123 (__cpp_lib_atomic_ref): Define.
124 * include/std/version (__cpp_lib_atomic_ref): Define.
125 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
126 * testsuite/29_atomics/atomic_float/1.cc: New test.
127 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
128 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
129 * testsuite/29_atomics/atomic_ref/float.cc: New test.
130 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
131 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
132 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
133 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
135 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
137 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
138 throw() with _GLIBCXX_NOTHROW.
139 (__atomic_add_dispatch): Return after performing atomic increment.
141 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
143 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
144 (__exchange_and_add): Replace static specifier with always_inline
146 (__exchange_and_add_single, __atomic_add_single): Likewise.
147 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
148 combine !__gthread_active_p() and !__GTHREADS branches.
150 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
153 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
154 * configure: Regenerate.
155 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
157 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
158 * testsuite/util/testsuite_abi.cc: Add new symbol version.
160 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
162 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
163 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
164 instead of __is_identifier to detect Clang support.
166 2019-07-02 Jim Wilson <jimw@sifive.com>
168 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
170 * configure: Regenerate.
172 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
175 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
176 for the what_arg parameters.
177 (filesystem_error::filesystem_error): Pass system_error::what() to
178 the _Impl constructor.
179 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
180 filesystem_error::what() contains system_error::what().
182 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
184 * include/std/charconv (chars_format): Define bitmask type.
185 * testsuite/20_util/to_chars/chars_format.cc: New test.
187 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
188 * include/std/bit (_If_is_unsigned_integer_type): Remove.
189 (_If_is_unsigned_integer): Use __is_unsigned_integer.
190 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
191 (countl_one(byte), countr_zero(byte), countr_one(byte))
192 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
193 (log2p1(byte)): Remove.
194 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
195 (__detail::__is_int_to_chars_type): Remove.
196 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
197 and __is_unsigned_integer.
198 * include/std/type_traits (__is_one_of): Move here from <charconv>.
199 (__is_signed_integer, __is_unsigned_integer): New helpers.
200 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
202 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
203 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
204 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
205 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
206 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
207 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
208 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
209 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
210 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
211 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
213 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
215 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
218 2019-06-25 Jakub Jelinek <jakub@redhat.com>
220 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
221 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
222 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
223 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
225 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
227 * include/std/numeric (midpoint(T, T)): Change implementation for
228 floating-point types to avoid incorrect rounding of denormals.
229 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
230 rounding with denormals.
231 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
232 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
234 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
236 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
238 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
240 * configure: Regenerate.
242 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
243 Qualify calls to __never_valueless.
245 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
248 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
249 vector<bool> for test.
250 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
252 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
254 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
256 (istream_iterator::_M_read()): Do not check stream state before
257 attempting extraction. Set stream pointer to null when extraction
259 (operator==(const istream_iterator&, const istream_iterator&)): Change
260 to be a hidden friend of istream_iterator.
261 (operator!=(const istream_iterator&, const istream_iterator&)):
263 (ostream_iterator::ostream_iterator()): Add default constructor.
264 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
266 * testsuite/24_iterators/istream_iterator/1.cc: New test.
267 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
268 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
269 constructor taking a string.
270 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
273 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
274 Jonathan Wakely <jwakely@redhat.com>
277 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
278 values of type bool for vector<bool> elements.
279 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
280 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
282 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
284 PR libstdc++/90920 partially revert r263433
285 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
286 (rotate): Remove checks.
287 * testsuite/25_algorithms/rotate/90920.cc: New test.
289 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
290 category used in invocable check.
291 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
292 * testsuite/26_numerics/reduce/2.cc: New test.
294 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
296 * include/bits/algorithmfwd.h: Change title of doc group.
297 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
299 * include/bits/stl_numeric.h: Define doc group and add algos to it.
300 * include/std/numeric (__is_random_access_iter): New internal trait.
301 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
302 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
303 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
304 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
305 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
306 * testsuite/26_numerics/reduce/1.cc: New test.
307 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
308 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
309 * testsuite/26_numerics/transform_reduce/1.cc: New test.
310 * testsuite/util/testsuite_iterators.h (test_container::size()): New
313 * include/c_global/cstddef (std::byte): Perform arithmetic operations
314 in unsigned int to avoid promotion (LWG 2950).
316 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
318 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
321 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
323 PR libstdc++/90281 Fix string conversions for filesystem::path
324 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
325 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
326 __str_codecvt_in_all to fail for partial conversions and throw on
328 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
329 (path::_Cvt<char8_t>): Add explicit specialization.
330 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
332 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
333 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
334 instead of codecvt_utf8. Use __str_codecvt_in_all and
335 __str_codecvt_out_all.
336 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
337 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
338 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
339 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
340 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
341 after converting to UTF-8.
342 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
343 __str_codecvt_in_all.
344 (path::string): Fix initialization of string types with different
346 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
347 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
348 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
350 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
351 return false for partial conversions.
352 * include/experimental/bits/fs_path.h (u8path):
353 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
354 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
355 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
356 instead of codecvt_utf8. Use __str_codecvt_in_all and
357 __str_codecvt_out_all.
358 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
359 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
360 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
361 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
362 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
363 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
364 __str_codecvt_in_all.
365 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
366 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
367 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
368 __str_codecvt_in_all.
369 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
370 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
371 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
372 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
373 strings and with Unicode characters outside the basic multilingual
375 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
376 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
377 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
378 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
379 * testsuite/experimental/filesystem/path/native/string.cc: Test with
380 empty strings and with Unicode characters outside the basic
383 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
384 Jonathan Wakely <jwakely@redhat.com>
386 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
387 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
388 deallocate node if insertion fails.
389 (_Hashtable::_M_insert_multi_node): Likewise.
390 (_Hashtable::_M_reinsert_node): Pass additional key argument.
391 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
392 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
393 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
394 (_Hashtable::extract(const _Key&)): Likewise.
395 (_Hashtable::_M_merge_unique): Pass additional key argument.
396 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
398 (_Hashtable::_M_insert): Likewise.
399 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
400 (_Hashtable_alloc): Add comments to functions with misleading names.
402 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
404 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
406 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
407 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
408 header for std::allocator.
409 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
410 using-declaration for std::size_t.
411 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
413 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
415 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
416 * testsuite/experimental/map/erasure.cc: Include <string> for
418 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
420 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
422 * include/experimental/type_traits (experimental::nonesuch): Use
423 pragma to disable -Wctor-dtor-privacy warnings.
424 * include/std/type_traits (__is_convertible_helper<From, To, false>)
425 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
427 * include/std/version (__cpp_lib_bind_front): Add missing macro.
429 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
431 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
432 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
433 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
434 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
436 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
437 (variant::emplace): Change static_assert messages from "should be"
439 (hash<monostate>::operator()): Remove name of unused parameter.
441 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
444 * include/Makefile.am: Add new <bits/charconv.h> header.
445 * include/Makefile.in: Regenerate.
446 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
447 (to_string(long), to_string(unsigned long), to_string(long long))
448 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
449 * include/bits/charconv.h: New header.
450 (__detail::__to_chars_len): Move here from <charconv>.
451 (__detail::__to_chars_10_impl): New function extracted from
452 __detail::__to_chars_10.
453 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
454 (__to_chars_unsigned_type): New class template that reuses
455 __make_unsigned_selector_base::__select to pick a type.
456 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
457 (__detail::__to_chars_len): Move to new header.
458 (__detail::__to_chars_10): Add inline specifier. Move code doing the
459 output to __detail::__to_chars_10_impl and call that.
460 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
461 * testsuite/21_strings/basic_string/numeric_conversions/char/
462 to_string.cc: Fix reference in comment. Remove unused variable.
463 * testsuite/21_strings/basic_string/numeric_conversions/char/
464 to_string_int.cc: New test.
466 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
468 Fix ConstexprIterator requirements tests - No constexpr algorithms!
469 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
470 Replace copy with hand-rolled loop.
471 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
474 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
476 Test for C++20 p0858 - ConstexprIterator requirements.
477 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
479 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
482 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
484 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
486 * include/bits/c++config: Rename all macros of the form __PSTL* to
488 * include/std/algorithm: Likewise.
489 * include/std/execution: Likewise.
490 * include/std/numeric: Likewise.
491 * include/std/memory: Likewise.
492 * include/pstl/glue_memory_impl.h: Likewise.
493 * include/pstl/numeric_impl.h: Likewise.
494 * include/pstl/glue_memory_defs.h: Likewise.
495 * include/pstl/execution_defs.h: Likewise.
496 * include/pstl/utils.h: Likewise.
497 * include/pstl/algorithm_fwd.h: Likewise.
498 * include/pstl/unseq_backend_simd.h: Likewise.
499 * include/pstl/glue_execution_defs.h: Likewise.
500 * include/pstl/algorithm_impl.h: Likewise.
501 * include/pstl/parallel_impl.h: Likewise.
502 * include/pstl/memory_impl.h: Likewise.
503 * include/pstl/glue_numeric_defs.h: Likewise.
504 * include/pstl/parallel_backend_utils.h: Likewise.
505 * include/pstl/glue_algorithm_defs.h: Likewise.
506 * include/pstl/parallel_backend.h: Likewise.
507 * include/pstl/glue_numeric_impl.h: Likewise.
508 * include/pstl/parallel_backend_tbb.h: Likewise.
509 * include/pstl/numeric_fwd.h: Likewise.
510 * include/pstl/glue_algorithm_impl.h: Likewise.
511 * include/pstl/execution_impl.h: Likewise.
512 * include/pstl/pstl_config.h: Likewise.
513 * testsuite/util/pstl/pstl_test_config.h: Likewise.
514 * testsuite/util/pstl/test_utils.h: Likewise.
515 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
517 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
519 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
521 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
522 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
523 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
524 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
525 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
527 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
528 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
529 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
530 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
531 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
533 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
534 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
535 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
536 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
537 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
539 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
540 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
541 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
543 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
545 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
546 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
547 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
549 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
551 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
553 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
555 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
557 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
559 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
561 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
563 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
565 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
567 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
569 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
571 Rename header guards to be consistent with upstream project's
573 * include/pstl/glue_memory_impl.h: Rename all macros of the form
574 _PSTL_(.*)_H to _PSTL_\U\1_H.
575 * include/pstl/numeric_impl.h: Likewise.
576 * include/pstl/glue_memory_defs.h: Likewise.
577 * include/pstl/execution_defs.h: Likewise.
578 * include/pstl/utils.h: Likewise.
579 * include/pstl/algorithm_fwd.h: Likewise.
580 * include/pstl/unseq_backend_simd.h: Likewise.
581 * include/pstl/glue_execution_defs.h: Likewise.
582 * include/pstl/algorithm_impl.h: Likewise.
583 * include/pstl/parallel_impl.h: Likewise.
584 * include/pstl/memory_impl.h: Likewise.
585 * include/pstl/glue_numeric_defs.h: Likewise.
586 * include/pstl/parallel_backend_utils.h: Likewise.
587 * include/pstl/glue_algorithm_defs.h: Likewise.
588 * include/pstl/parallel_backend.h: Likewise.
589 * include/pstl/glue_numeric_impl.h: Likewise.
590 * include/pstl/parallel_backend_tbb.h: Likewise.
591 * include/pstl/numeric_fwd.h: Likewise.
592 * include/pstl/glue_algorithm_impl.h: Likewise.
593 * include/pstl/execution_impl.h: Likewise.
594 * include/pstl/pstl_config.h: Likewise.
595 * testsuite/util/pstl/pstl_test_config.h: Likewise.
597 Synchronize libstdc++ parallel algorithms with upstream
599 * include/pstl/algorithm_fwd.h: Synchronize with
600 upstream PSTL project.
601 * include/pstl/algorithm_impl.h: Likewise.
602 * include/pstl/execution_defs.h: Likewise.
603 * include/pstl/execution_impl.h: Likewise.
604 * include/pstl/glue_algorithm_impl.h: Likewise.
605 * include/pstl/glue_execution_defs.h: Likewise.
606 * include/pstl/numeric_fwd.h: Likewise.
607 * include/pstl/numeric_impl.h: Likewise.
608 * include/pstl/parallel_backend.h: Likewise.
609 * include/pstl/pstl_config.h: Likewise.
610 * include/pstl/unseq_backend_simd.h: Likewise.
611 * include/pstl/parallel_backend_serial.h: New file.
612 * include/Makefile.am (pstl_headers): Add
613 parallel_backend_serial.h.
614 * include/Makefile.in: Regenerate.
616 Clean up non-conforming names
617 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
618 Uglfiy copy_range1 and copy_range2
619 (__pattern_walk2_n): Rename local n to __n
620 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
621 Rename parameter _T to _Tp.
623 Integrate non-TBB serial backend support
624 * include/bits/c++config: Adjust TBB detection logic to select serial
625 PSTL backend if no TBB present.
626 * testsuite/utils/pstl/test_utils.h: Remove check for
627 _PSTL_USE_PAR_POLICIES
629 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
631 * testsuite/24_iterators/container_access.cc: Move dg-options before
632 dg-do directive so the target check uses the -std option.
635 * configure: Regenerate.
636 * src/Makefile.am (stamp-debug): Also test for missing makefile.
637 * src/Makefile.in: Regenerate.
639 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
641 * include/std/array: Do not include <stdexcept>.
642 * include/std/optional: Include <exception> and
643 <bits/exception_defines.h> instead of <stdexcept>.
644 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
646 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
648 * testsuite/23_containers/map/erasure.cc: Include <string>.
649 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
651 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
652 dg-prune-output for different C++98 diagnostic.
653 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
655 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
657 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
659 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
661 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
663 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
665 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
667 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
669 * testsuite/23_containers/vector/requirements/dr438/
670 constructor_1_neg.cc: Likewise.
671 * testsuite/23_containers/vector/requirements/dr438/
672 constructor_2_neg.cc: Likewise.
673 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
675 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
677 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
678 Do not test allocator rebinding extension for C++2a.
679 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
680 dg-do directive for C++17 and C++2a.
682 * testsuite/23_containers/deque/requirements/explicit_instantiation/
683 1_c++0x.cc: Remove redundant test.
684 * testsuite/23_containers/deque/requirements/explicit_instantiation/
685 2.cc: Use target selector instead of preprocessor condition.
686 * testsuite/23_containers/deque/requirements/explicit_instantiation/
687 3.cc: Do not run test for C++2a.
688 * testsuite/23_containers/forward_list/requirements/
689 explicit_instantiation/3.cc: Likewise.
690 * testsuite/23_containers/forward_list/requirements/
691 explicit_instantiation/5.cc: Do not test allocator rebinding extension
693 * testsuite/23_containers/list/requirements/explicit_instantiation/
694 1_c++0x.cc: Remove redundant test.
695 * testsuite/23_containers/list/requirements/explicit_instantiation/
696 2.cc: Use target selector instead of preprocessor condition.
697 * testsuite/23_containers/list/requirements/explicit_instantiation/
698 3.cc: Do not run test for C++2a.
699 * testsuite/23_containers/list/requirements/explicit_instantiation/
700 5.cc: Do not test allocator rebinding extension for C++2a.
701 * testsuite/23_containers/map/requirements/explicit_instantiation/
702 1_c++0x.cc: Remove redundant test.
703 * testsuite/23_containers/map/requirements/explicit_instantiation/
704 2.cc: Adjust comment.
705 * testsuite/23_containers/map/requirements/explicit_instantiation/
706 3.cc: Do not run test for C++2a.
707 * testsuite/23_containers/map/requirements/explicit_instantiation/
708 5.cc: Do not test allocator rebinding extension for C++2a.
709 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
710 1_c++0x.cc: Remove redundant test.
711 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
712 3.cc: Do not run test for C++2a.
713 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
714 5.cc: Do not test allocator rebinding extension for C++2a.
715 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
716 3.cc: Do not run test for C++2a.
717 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
718 5.cc: Do not test allocator rebinding extension for C++2a.
719 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
720 Do not run test for C++2a.
721 * testsuite/23_containers/set/requirements/explicit_instantiation/
722 1_c++0x.cc: Remove redundant test.
723 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
724 Do not test allocator rebinding extension for C++2a.
725 * testsuite/23_containers/unordered_map/requirements/
726 explicit_instantiation/3.cc: Likewise.
727 * testsuite/23_containers/unordered_map/requirements/
728 explicit_instantiation/5.cc: Do not test allocator rebinding extension
730 * testsuite/23_containers/unordered_multimap/requirements/
731 explicit_instantiation/3.cc: Do not run test for C++2a.
732 * testsuite/23_containers/unordered_multimap/requirements/
733 explicit_instantiation/5.cc: Do not test allocator rebinding extension
735 * testsuite/23_containers/unordered_multiset/requirements/
736 explicit_instantiation/3.cc: Do not run test for C++2a.
737 * testsuite/23_containers/unordered_multiset/requirements/
738 explicit_instantiation/5.cc: Do not test allocator rebinding extension
740 * testsuite/23_containers/unordered_set/requirements/
741 explicit_instantiation/3.cc: Do not run test for C++2a.
742 * testsuite/23_containers/unordered_set/requirements/
743 explicit_instantiation/5.cc: Do not test allocator rebinding extension
745 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
746 2.cc: Remove redundant test.
747 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
748 3.cc: Do not run test for C++2a.
749 * testsuite/23_containers/vector/requirements/explicit_instantiation/
752 * include/std/type_traits (is_empty, is_polymorphic, is_final)
753 (is_abstract, is_aggregate): Remove static_assert.
754 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
756 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
757 missing -std=gnu++17 option.
758 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
759 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
760 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
763 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
764 * testsuite/18_support/set_unexpected.cc: Likewise.
765 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
767 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
768 function to be valid in C++11.
769 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
770 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
771 include Library Fundamentals or Networking headers in C++11 mode.
772 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
774 * include/std/tuple (_TC): Replace with _TupleConstraints.
775 (_TupleConstraints): New helper for SFINAE constraints, with more
776 expressive member functions to reduce duplication when used.
777 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
778 (tuple::_TCC): Replace dummy type parameter with bool non-type
779 parameter that can be used to check the pack size.
780 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
781 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
782 checking constraints in constructors.
783 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
785 (tuple::tuple): Use new helpers to reduce repitition in constraints.
786 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
787 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
788 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
789 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
790 constraints in constructors.
791 (tuple::__is_alloc_arg()): New SFINAE helpers.
792 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
794 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
795 * testsuite/20_util/tuple/cons/90700.cc: New test.
796 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
797 to meet new constraint on allocator-extended default constructor.
799 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
801 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
802 * include/bits/stl_multimap.h (multimap): Likewise.
804 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
806 Rename variables and cleanup comments.
807 * include/bits/hashtable_policy.h
808 * include/bits/hashtable.h
810 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
812 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
813 Fix bgcolor for P0340R3.
814 * doc/html/*: Regenerate.
817 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
818 <experimental/memory_resource>.
819 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
820 P0339R6, P0340R3, P1164R1 and P1357R1.
821 * doc/html/*: Regenerate.
823 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
824 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
825 allocator::value_type assertion for C++2a.
826 * include/bits/hashtable.h: Likewise.
827 * include/bits/stl_deque.h: Likewise.
828 * include/bits/stl_list.h: Likewise.
829 * include/bits/stl_map.h: Likewise.
830 * include/bits/stl_multimap.h: Likewise.
831 * include/bits/stl_multiset.h: Likewise.
832 * include/bits/stl_set.h: Likewise.
833 * include/bits/stl_vector.h: Likewise.
834 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
835 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
836 * testsuite/23_containers/list/48101-3_neg.cc: New test.
837 * testsuite/23_containers/map/48101-3_neg.cc: New test.
838 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
839 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
840 * testsuite/23_containers/set/48101-3_neg.cc: New test.
841 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
842 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
843 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
844 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
845 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
847 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
849 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
851 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
853 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
855 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
857 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
859 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
861 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
864 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
865 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
866 * libsupc++/eh_term_handler.h: New header defining
867 _GLIBCXX_DEFAULT_TERM_HANDLER.
868 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
869 (set_terminate): Restore default handler when argument is null.
870 (set_unexpected): Likewise.
871 * testsuite/18_support/set_terminate.cc: New test.
872 * testsuite/18_support/set_unexpected.cc: New test.
874 * include/backward/hashtable.h (size_t, ptrdiff_t)
875 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
876 (distance, vector, pair, __iterator_category): Remove
877 using-declarations that add these names to namespace __gnu_cxx.
878 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
879 * include/ext/debug_allocator.h (size_t): Likewise.
880 * include/ext/functional (size_t, unary_function, binary_function)
881 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
883 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
884 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
885 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
886 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
887 * include/ext/numeric (iota): Fix outdated comment.
888 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
889 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
890 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
891 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
892 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
894 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
895 (allocator, __true_type, __false_type): Likewise.
897 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
900 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
901 New helpers for checking preconditions in traits.
902 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
903 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
904 (is_destructible, is_nothrow_destructible, is_constructible)
905 (is_default_constructible, is_copy_constructible)
906 (is_move_constructible, is_nothrow_default_constructible)
907 (is_nothrow_constructible, is_nothrow_copy_constructible)
908 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
909 (is_nothrow_assignable, is_nothrow_copy_assignable)
910 (is_nothrow_move_assignable, is_trivially_constructible)
911 (is_trivially_copy_constructible, is_trivially_move_constructible)
912 is_trivially_assignable, is_trivially_copy_assignable)
913 (is_trivially_move_assignable, is_trivially_destructible)
914 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
915 (is_invocable_r, is_nothrow_invocable)
916 (has_unique_object_representations, is_aggregate): Add static_asserts
917 to make sure that type traits are not misused with incomplete types.
918 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
919 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
920 base characteristics without assertions that can be reused in other
922 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
923 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
925 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
926 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
927 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
928 * testsuite/20_util/is_class/value.cc: Check incomplete type.
929 * testsuite/20_util/is_function/value.cc: Likewise.
930 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
931 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
933 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
934 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
935 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
936 * testsuite/20_util/is_union/value.cc: Likewise.
937 * testsuite/20_util/is_void/value.cc: Likewise.
938 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
940 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
942 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
943 Add new private member function.
944 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
945 (random_device::_M_init_pretr1(const string&)): Call new private
946 member with string data.
947 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
949 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
950 test using COW strings.
951 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
952 a value from the device.
953 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
954 Fix typo in token string.
956 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
958 LWG2788 basic_string spurious use of a default constructible allocator
959 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
960 (basic_string::_M_replace_dispatch): Construct temporary string with
961 the current allocator.
962 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
963 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
965 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
967 * doc/xml/manual/diagnostics.xml: Update list of headers that define
969 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
970 section about new/delete overloads. Improve section on verbose
972 * doc/html/*: Regenerate.
974 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
975 P0811R3. Change status of P1353R0.
976 * doc/html/*: Regenerate.
978 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
979 documentation of implementation-defined types for [thread.req.native].
980 * doc/xml/manual/status_cxx2017.xml: Update documentation of
981 implementation-defined strings for [variant.bad.access]. Fix typo in
982 documentation of implementation-defined support for [fs.conform.9945].
983 * doc/html/*: Regenerate.
985 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
988 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
989 that fails on mingw-w64.
992 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
993 (status(const path&, error_code&)): Use parent_path() to remove
995 (symlink_status(const path&, error_code&)): Duplicate workaround for
996 bug in _wstat for paths with trailing slash.
997 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
999 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1000 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1002 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1003 once instead of building it iteratively.
1005 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1007 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1008 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1009 the assembler supports rdseed.
1010 * config.h.in: Regenerate.
1011 * configure: Regenerate.
1012 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1013 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1014 * doc/html/*: Regenerate.
1015 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1016 * include/bits/random.h (random_device::random_device()): Always call
1017 _M_init rather than _M_init_pretr1.
1018 (random_device::random_device(const string&)): Likewise.
1019 (random_device::operator()()): Always call _M_getval().
1020 (random_device::_M_file): Replace first member of union with an
1021 anonymous struct, with _M_file as its first member.
1022 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1023 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1024 (USE_MT19937): Define if none of the above are defined.
1025 (USE_POSIX_FILE_IO): Define.
1026 (_M_strtoul): Remove.
1027 [USE_RDSEED] (__x86_rdseed): Define new function.
1028 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1029 (random_device::_M_init(const string&)): Initialize new union members.
1030 Add support for "rdseed" and "rand_s" tokens. Decide what the
1031 "default" token does according to which USE_* macros are defined.
1032 [USE_POSIX_FILE_IO]: Store a file descriptor.
1033 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1034 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1035 code from _M_strtoul.
1036 [!USE_MT19937]: Call _M_init, transforming the old default token or
1037 numeric tokens to "default".
1038 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1039 (random_device::_M_getval()): Use new union members to obtain a
1040 random number from the stored function pointer or file descriptor.
1041 [USE_MT19937]: Obtain a value from the mt19937 engine.
1042 (random_device::_M_getval_pretr1()): Call _M_getval().
1043 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1045 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1046 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1048 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1051 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1052 _M_split_cmpts() for a path with multiple components.
1053 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1054 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1055 components and reserve space in vector. Return early when there is
1057 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1058 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1060 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1061 form of std::equals for C++11 compatibility.
1063 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1065 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1066 C++ standard at ansi.org.
1068 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1070 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1071 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1074 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1075 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1077 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1079 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1081 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1082 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1083 "compile" test to "run".
1085 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1086 * doc/html/*: Regenerate.
1087 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1088 rvalue aliasing constructor.
1089 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1090 (reinterpret_pointer_cast): Add overloads taking rvalues.
1091 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1092 Add rvalue aliasing constructor.
1093 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1094 "run" and check return values as well as types.
1095 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1096 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1097 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1098 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1101 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1102 * doc/xml/manual/intro.xml: Likewise.
1103 * include/std/future (__create_task_state): Add default arguments
1104 to make providing an allocator optional.
1105 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1106 instead of delegating to another constructor.
1107 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1108 define allocator-extended constructors for C++17 and later.
1109 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1111 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1112 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1113 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1115 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1117 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1118 Don't run the libstdc++/83237 part on simulator targets.
1120 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1122 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1124 * doc/html/*: Regenerate.
1126 * include/experimental/any (__any_caster): Use RTTI if comparing
1127 addresses fails, to support non-unique addresses in shared libraries.
1128 * include/std/any (__any_caster): Likewise.
1131 * include/experimental/any (__any_caster): Constrain to only be
1132 callable for object types. Use remove_cv_t instead of decay_t.
1133 If the type decays or isn't copy constructible, compare the manager
1134 function to a dummy specialization.
1135 (__any_caster): Add overload constrained for non-object types.
1136 (any::_Manager_internal<_Op>): Add dummy specialization.
1137 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1140 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1143 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1144 reversed arguments to uninitialized_copy_n.
1145 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1146 is unchanged by copy assignment.
1147 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1148 compare path components.
1151 * include/experimental/memory_resource: Add system header pragma and
1152 do not define anything unless compiled as C++14 or later.
1153 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1154 (__resource_adaptor_imp::do_allocate): If the requested alignment
1155 is a fundamental alignment then either allocate directly from _M_alloc
1156 or call the new _M_allocate function.
1157 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1158 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1159 of the allocator rebound to a POD type with the specified alignment.
1160 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1161 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1162 Adjust expected allocation sizes.
1163 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1164 xfail for Solaris x86.
1166 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1168 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1169 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1170 Use std::__remove_cvref_t when building with GCC.
1172 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1175 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1176 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1177 Use check_v3_target_prop_cached to cache the result of the test.
1179 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1181 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1184 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1185 Changed v3_target_compile check from preprocess to executable.
1186 Added "-ltbb" to v3_target_compile flags.
1188 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1190 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1191 Add check for Thread Building Blocks 2018 or later.
1193 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1195 * testsuite/experimental/names.cc: Only include Networking TS headers
1196 on targets with the necessary Gthreads support.
1198 2019-05-20 Marek Polacek <polacek@redhat.com>
1200 CWG 2094 - volatile scalars are trivially copyable.
1202 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1203 result for volatile int.
1205 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1207 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1208 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1211 PR c++/90532 Ensure __is_constructible(T[]) is false
1212 * include/std/type_traits (__do_is_default_constructible_impl)
1213 (__is_default_constructible_atom, __is_default_constructible_safe):
1215 (is_default_constructible): Use is_constructible.
1216 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1217 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1218 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1219 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1222 2019-05-20 Pádraig Brady <pbrady@fb.com>
1224 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1225 to the deallocator with -fsized-deallocation.
1227 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1229 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1230 test by passing correct alignment to deallocate function.
1232 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1235 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1236 Raise exception if unique_ptr tuple member has unknown structure.
1237 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1238 Adjust worker to support new __uniq_ptr_data base class. Do not
1239 assume field called _M_head_impl is the first tuple element.
1241 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1243 * include/bits/stl_deque.h
1244 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1245 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1246 (_Deque_base::_Deque_impl_data): New.
1247 (_Deque_base::_Deque_impl): Inherit latter.
1248 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1249 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1250 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1251 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1252 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1253 (deque<>::deque()): Default.
1254 (deque<>::deque(deque&&)): Default.
1255 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1256 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1257 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1258 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1259 _M_range_initialize.
1260 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1261 (deque<>::resize(size_type, const value_type&)): Share a single
1263 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1264 _M_range_insert_aux.
1265 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1266 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1267 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1268 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1270 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1273 * include/std/variant (holds_alternative, get, get_if): Improve
1274 static assertion messages.
1275 (bad_variant_access::bad_variant_access()): Change default message.
1276 (__throw_bad_variant_access(bool)): New overload.
1277 (get): Use new overload.
1278 (visit, visit<R>): Improve exception message.
1280 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1281 targets. Add more cases from P0608R3.
1282 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1284 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1285 * include/experimental/type_traits (is_detected_exact)
1286 (is_detected_exact_v): Likewise.
1287 * include/pstl/execution_defs.h (is_execution_policy)
1288 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1289 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1290 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1291 * testsuite/experimental/names.cc: New test.
1294 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1295 assertions from the destructor.
1296 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1297 Move static_assert for hash function to here.
1298 (_Hash_table_base::_M_equals): Move static_assert for equality
1300 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1302 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1303 the value directly instead of calling _S_value.
1304 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1305 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1306 _S_key(_Const_Link_type).
1307 * testsuite/23_containers/set/85965.cc: Check construction,
1308 destruction, assignment and size() do not trigger the assertions.
1309 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1310 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1312 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1313 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1314 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1315 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1316 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1317 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1318 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1320 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1321 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1324 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1326 * doc/html/*: Regenerate.
1327 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1328 of decay_t (P0777R1).
1330 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1332 Move from state of allocators (LWG2593)
1333 * include/bits/stl_deque.h
1334 (_Deque_base(_Deque_base&&, false_type)): Remove.
1335 (_Deque_base(_Deque_base&&, true_type)): Remove.
1336 (_Deque_base(_Deque_base&&)): Adapt.
1337 (_Deque_base::_M_move_impl()): Remove.
1338 * testsuite/util/testsuite_allocator.h
1339 (propagating_allocator(propagating_allocator&&)): Preserve move from
1341 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1343 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1345 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1346 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1347 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1349 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1351 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1352 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1354 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1356 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1358 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1360 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1362 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1364 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1366 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1369 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1371 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1372 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1374 * include/std/variant (__overload_set): Remove.
1376 (_Build_FUN): New class template to define a single FUN overload,
1377 with specializations to prevent unwanted conversions, as per P0608R3.
1378 (_Build_FUNs): New class template to build an overload set of FUN.
1379 (_FUN_type): New alias template to perform overload resolution.
1380 (__accepted_type): Use integer_constant base for failure case. Use
1381 _FUN_type for successful case.
1382 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1383 (variant::variant(_Tp&&)): Likewise.
1384 (variant::operator=(_Tp&&)): Likewise.
1386 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1387 Replace raw visitation with a runtime check for the valueless state
1388 and a non-raw visitor.
1389 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1390 (variant::index()): Remove branch.
1391 (variant::swap(variant&)): Use valueless_by_exception() instead of
1392 comparing the index to variant_npos, and add likelihood attribute.
1394 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1395 (_Hashtable_base::_Equal_hash_code): Define new class template.
1396 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1399 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1400 Replace with _M_get non-static member function.
1401 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1403 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1404 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1406 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1407 _S_get accessors for members in EBO helpers.
1408 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1409 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1411 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1413 (_Hashtable_base::_M_eq()): Remove non-const overload.
1415 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1417 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1419 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1421 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1424 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1426 * config/os/solaris/solaris2.10: Move to ...
1427 * config/os/solaris: ... this.
1428 * configure.host (os_include_dir): Adapt.
1429 (abi_baseline_pair): Remove Solaris 10 handling.
1430 * config/abi/post/i386-solaris2.10: Remove.
1431 * config/abi/post/sparc-solaris2.10: Remove.
1432 * config/abi/post/i386-solaris2.11: Rename to ...
1433 * config/abi/post/i386-solaris: ... this.
1434 * config/abi/post/sparc-solaris2.11: Rename to ...
1435 * config/abi/post/sparc-solaris: ... this.
1437 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1440 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1443 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1445 * include/std/variant (__visit_with_index): Remove typedef.
1446 (__deduce_visit_result): New tag type.
1447 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1448 visitation of possibly-valueless variants, forwarding to __do_visit
1449 with the relevant tag type.
1450 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1451 and make lambda return void.
1452 (__variant_construct): Likewise.
1453 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1454 __raw_idx_visit and make lambda return void.
1455 (_Multi_array::__untag_result): Add metafunction to check the function
1456 pointer type for a tag type that dictates the kind of visitation.
1457 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1458 Use decltype(auto) instead of tagged function pointer type.
1459 (__gen_vtable_impl): Remove bool non-type parameter and unused
1460 _Variant_tuple parameter.
1461 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1462 (__gen_vtable_impl::__do_visit_invoke): Remove.
1463 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1464 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1465 for the visit<R> case, rather than dispatching to separate functions.
1466 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1468 (variant::swap): Likewise.
1469 (__do_visit): Replace two non-type template parameters with a single
1470 type parameter, so that the caller must specify the visitor's return
1471 type (or one of the tag types).
1472 (visit): Deduce a return type from the visitor and use the
1473 __deduce_visit_result tag to enforce that all overloads return the
1475 (visit<R>): Call __do_visit<R> with explicit result type.
1476 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1479 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1481 nonesuch is insufficiently useless (lwg2996)
1482 * include/std/type_traits (struct __nonesuch): Added private base
1483 class to make __nonesuch not an aggregate and removed deleted default
1485 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1486 (operator=(const pair&)): Use __nonesuch instead of
1487 __nonesuch_no_braces.
1488 (operator=(pair&&)): Likewise
1489 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1490 of __nonesuch_no_braces.
1491 (operator=(tuple&&)): Likewise
1492 * include/experimental/type_traits (struct nonesuch): Added private
1493 base class to make nonesuch not an aggregate and removed deleted
1494 default constructor.
1495 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1496 * testsuite/experimental/type_traits/nonesuch.cc: New.
1498 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1500 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1501 (_Function_handler): Remove partial specializations for void return
1502 types and pointers to member.
1503 (_Function_handler::_M_manager): Adapt to removal of
1504 _Simple_type_wrapper.
1505 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1506 * include/std/functional (_Bind_result::__enable_if_void)
1507 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1508 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1510 * include/std/future (__future_base::_Task_state::_M_run)
1511 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1512 change return type of lambda expressions.
1514 * include/bits/invoke.h (__invoke_r): Define new function implementing
1515 the INVOKE<R> pseudo-function.
1516 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1517 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1519 * include/std/type_traits (__is_nt_convertible_helper): Define it
1520 unconditionally, not only for C++20.
1521 (__is_nothrow_convertible): Define internal trait for use in C++11.
1522 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1523 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1524 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1525 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1526 that has nothrow explicit conversion but potentially-throwing implicit
1528 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1529 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1530 function to only consider implicit conversions.
1531 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1533 * include/std/iterator: Include <iosfwd> instead of <istream> and
1536 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1537 Remove unused, non-standard function.
1539 * include/bits/regex.h (match_results::max_size()): Adjust return
1540 value to account for prefix/suffix/unmatched subs.
1541 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1542 reset the contained sub matches.
1543 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1544 function to set result state following a failed match.
1545 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1546 sub_match states after _M_resize. Use _M_establish_failed_match.
1549 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1550 Replace single _Callable parameter with variadic _Args pack, to
1551 forward them directly to the tuple of decayed copies.
1552 * testsuite/30_threads/thread/cons/69724.cc: New test.
1554 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1556 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1557 * include/bits/basic_string.h: (operator=(const basic_string&):
1558 Move allocator decision to assign.
1559 (assign(const basic_string&)): Move allocator decision here.
1560 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1562 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1565 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1567 * testsuite/util/testsuite_allocator.h (memory_resource)
1568 (default_resource_mgr): Fix indentation.
1570 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1571 Use operator-> to access raw pointer member.
1572 * testsuite/23_containers/vector/59829.cc: Likewise.
1573 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1574 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1575 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1577 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1578 its constructors and equality operators. Change converting
1579 constructors to use operator-> to access private member of the other
1581 (PointerBase_void::operator->()): Add, for access to private member.
1582 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1583 (operator==(PointerBase, PointerBase)): Remove.
1584 (operator!=(PointerBase, PointerBase)): Remove.
1586 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1587 not assume field called _M_head_impl is the first tuple element.
1588 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1589 implementation more accurate.
1590 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1591 empty pointer type and non-empty deleter.
1593 LWG 2899 - Make is_move_constructible correct for unique_ptr
1594 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1595 move assignment operator.
1596 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1597 (__uniq_ptr_data): New class template with conditionally deleted
1599 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1600 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1601 constructor and move assignment operator as defaulted.
1602 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1603 __uniq_ptr_impl::release().
1604 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1605 to __uniq_ptr_impl::reset(pointer).
1606 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1607 Check for new __uniq_ptr_data type.
1608 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1610 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1612 PR libstdc++/90454.cc path construction from void*
1613 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1614 pointers to void are rejected as well as void.
1615 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1616 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1618 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1620 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1621 <remark> elements. Fix formatting of bibliography references.
1623 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1625 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1627 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1629 Remove Profile Mode, deprecated since 7.1.0
1630 * doc/Makefile.am: Remove XML file for profile mode docs.
1631 * doc/Makefile.in: Regenerate.
1632 * doc/xml/authors.xml: Remove authors of profile mode docs.
1633 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1635 * doc/xml/manual/debug.xml: Likewise.
1636 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1637 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1638 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1639 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1641 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1643 * doc/html/*: Regenerate.
1644 * include/Makefile.am: Remove profile mode headers.
1645 * include/Makefile.in: Regenerate.
1646 * include/bits/c++config (std::__profile): Remove namespace.
1647 [_GLIBCXX_PROFILE]: Remove checks for macro.
1648 * include/profile/array: Remove.
1649 * include/profile/base.h: Remove.
1650 * include/profile/bitset: Remove.
1651 * include/profile/deque: Remove.
1652 * include/profile/forward_list: Remove.
1653 * include/profile/impl/profiler.h: Remove.
1654 * include/profile/impl/profiler_algos.h: Remove.
1655 * include/profile/impl/profiler_container_size.h: Remove.
1656 * include/profile/impl/profiler_hash_func.h: Remove.
1657 * include/profile/impl/profiler_hashtable_size.h: Remove.
1658 * include/profile/impl/profiler_list_to_slist.h: Remove.
1659 * include/profile/impl/profiler_list_to_vector.h: Remove.
1660 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1661 * include/profile/impl/profiler_node.h: Remove.
1662 * include/profile/impl/profiler_state.h: Remove.
1663 * include/profile/impl/profiler_trace.h: Remove.
1664 * include/profile/impl/profiler_vector_size.h: Remove.
1665 * include/profile/impl/profiler_vector_to_list.h: Remove.
1666 * include/profile/iterator_tracker.h: Remove.
1667 * include/profile/list: Remove.
1668 * include/profile/map: Remove.
1669 * include/profile/map.h: Remove.
1670 * include/profile/multimap.h: Remove.
1671 * include/profile/multiset.h: Remove.
1672 * include/profile/ordered_base.h: Remove.
1673 * include/profile/set: Remove.
1674 * include/profile/set.h: Remove.
1675 * include/profile/unordered_base.h: Remove.
1676 * include/profile/unordered_map: Remove.
1677 * include/profile/unordered_set: Remove.
1678 * include/profile/vector: Remove.
1679 * scripts/run_doxygen: Do not process profile mode headers.
1680 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1682 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1683 Remove dg-skip-if for profile mode.
1684 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1685 preprocessor check for profile mode.
1686 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1687 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1689 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1691 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1692 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1693 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1694 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1695 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1697 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1699 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1701 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1703 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1704 preprocessor check for profile mode.
1705 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1707 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1708 Remove dg-skip-if for profile mode.
1709 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1710 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1711 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1712 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1713 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1714 * testsuite/Makefile.am: Remove profile_flags variable and
1715 * testsuite/Makefile.am: Remove profile_flags variable and
1716 check-profile target.
1717 * testsuite/Makefile.in: Regenerate.
1718 * testsuite/ext/profile/all.cc: Remove.
1719 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1720 * testsuite/ext/profile/profiler_algos.cc: Remove.
1721 * testsuite/ext/profile/replace_new.cc: Remove.
1722 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1723 preprocessor check for profile mode.
1724 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1725 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1726 (check_v3_target_normal_mode): Do not check for profile mode macro.
1727 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1729 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1730 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1731 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1732 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1733 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1734 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1735 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1736 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1737 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1738 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1740 Remove array_allocator extension, deprecated since 4.9.0
1741 * doc/xml/manual/allocator.xml: Remove documentation for
1743 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1744 * doc/xml/manual/using.xml: Remove header from documentation.
1745 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1746 * include/Makefile.in: Regenerate.
1747 * include/ext/array_allocator.h: Remove.
1748 * include/precompiled/extc++.h: Do not include removed header.
1749 * testsuite/ext/array_allocator/1.cc: Remove.
1750 * testsuite/ext/array_allocator/2.cc: Remove.
1751 * testsuite/ext/array_allocator/26875.cc: Remove.
1752 * testsuite/ext/array_allocator/3.cc: Remove.
1753 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1754 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1755 * testsuite/ext/array_allocator/check_new.cc: Remove.
1756 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1757 * testsuite/ext/headers.cc: Do not include removed header.
1759 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1761 * include/bits/stl_bvector.h
1762 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1764 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1766 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1768 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1770 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1772 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1774 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1776 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1778 (_Bit_iterator::operator-(difference_type)): Likewise.
1779 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1780 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1782 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1783 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1785 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1788 * testsuite/util/thread/all.h: Do not use remove_pointer for
1789 std::thread::native_handle_type.
1792 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1793 (_Variant_storage<true, Types...>::_M_reset()))
1794 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1795 (__get_storage): Likewise.
1796 (variant): Add noexcept to friend declarations for __get and
1800 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1801 Use _Require for constraints.
1802 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1804 (__uniq_ptr_hash): New base class with conditionally-disabled call
1806 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1807 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1808 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1810 * include/bits/shared_ptr.h: Improve docs.
1811 * include/bits/shared_ptr_base.h: Likewise.
1812 * include/bits/stl_uninitialized.h: Likewise.
1813 * include/bits/unique_ptr.h: Likewise.
1814 * libsupc++/new: Likewise.
1816 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1818 * include/bits/stl_deque.h
1819 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1821 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1823 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1825 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1827 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1829 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1831 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1833 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1835 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
1838 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1839 (test01): Reserve for number of insertions to avoid rehash during test.
1840 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1842 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1847 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
1849 * include/experimental/bits/fs_path.h: Improve docs.
1850 * include/experimental/bits/net.h: Fix wrong header name in comment.
1851 Do not document implementation details.
1852 * include/experimental/netfwd: Fix doxygen grouping.
1854 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1856 * include/bits/stl_pair.h: Improve docs.
1857 * include/std/tuple: Likewise.
1859 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1861 * include/std/chrono: Improve docs.
1862 * include/std/ratio: Do not document implementation details.
1863 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1865 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1868 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1869 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1870 (__duration_common_type): New helper.
1871 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1872 __duration_common_type.
1873 (__timepoint_common_type_wrapper): Replace with ...
1874 (__timepoint_common_type): New helper.
1875 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1876 Use __time_point_common_type.
1877 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1878 (__common_type_impl): If either argument is transformed by decay,
1879 use the common_type of the decayed types.
1880 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1881 decayed, use __do_common_type_impl to get the common_type.
1882 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1883 (__do_member_type_wrapper, __member_type_wrapper)
1884 (__expanded_common_type_wrapper): Remove.
1885 (__common_type_pack, __common_type_fold): New helpers.
1886 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1887 __member_type_wrapper and __expanded_common_type_wrapper.
1888 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1889 Test zero-length template argument list.
1890 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1891 Test single argument cases and argument types that should decay.
1892 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1893 Adjust expected error.
1894 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1896 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1897 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1898 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1900 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1902 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1904 Make allocator propagation more consistent for
1905 operator+(basic_string) (P1165R1)
1906 * include/bits/basic_string.h
1907 (operator+(basic_string&&, basic_string&&): Changed resulting
1908 allocator to always be the one from the first parameter.
1909 * include/bits/basic_string.tcc
1910 (operator+(const _CharT*, const basic_string&)): Changed
1911 resulting allocator to be SOCCC on the second parameter's allocator.
1912 (operator+(_CharT, const basic_string&)): Likewise.
1913 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1915 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1918 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1920 * include/bits/regex.h: Improve docs.
1921 * include/bits/regex.tcc: Do not document implementation details.
1923 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1925 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1927 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1928 Add type printer for container types in std::__debug namespace.
1929 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1930 (gdb-tests): Use distinct parameters for the type of test and use of
1932 (gdb-test): Check for regex test even if 'whatis' test.
1933 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1935 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1936 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1937 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1938 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1939 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1940 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1941 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1943 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1945 * include/std/system_error (error_category): Fix comment.
1948 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1949 argument is an empty path.
1950 (absolute(const path&, error_code&)): Use invalid_argument as error
1951 code instead of no_such_file_or_directory.
1952 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1953 of non-existent paths and empty paths with both overloads of absolute.
1955 * include/std/system_error (error_category, error_code)
1956 (error_condition): Improve docs.
1957 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1958 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1959 to class documentation. Suppress documentation for implementation
1961 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1962 Suppress documentation for implementation details.
1964 * include/std/system_error (error_code): Remove friend declaration
1965 for hash<error_code>.
1966 (hash<error_code>::operator()): Use public member functions to access
1968 (hash<error_condition>::operator()): Use address of category, not
1969 its object representation.
1970 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1971 Use public member functions to access value and category.
1972 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1974 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1976 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1977 * include/bits/hashtable_policy.h
1978 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1979 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1980 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1981 smaller than input value rather than always greater. Preserve
1982 _M_next_resize if called with 0 input. Use __builtin_floorl.
1983 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1984 elements + number of insertions is greater than _M_next_resize. Start
1985 with 11 buckets if not told otherwise. Use __builtin_floorl.
1986 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1987 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1988 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1989 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1990 told otherwise. Use __builtin_floorl.
1991 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1992 to also validate _Power2_rehash_policy.
1993 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1996 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1999 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2003 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2004 overflow warning with -Wpedantic -Wsystem-headers.
2006 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2009 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2010 * include/bits/move.h (swap): Remove extra parentheses.
2012 * include/experimental/bits/lfts_config.h: Improve doc markup.
2013 * include/experimental/optional: Improve docs.
2014 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2015 (__constexpr_addressof): Remove.
2016 (optional::operator->()): Use std::__addressof().
2017 * include/std/optional (optional::operator->()): Adjust whitespace.
2018 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2019 that operator-> is still constexpr with overloaded operator&. Change
2020 to compile-only test.
2021 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2024 * include/bits/shared_ptr.h: Improve docs.
2025 * include/bits/shared_ptr_atomic.h: Likewise.
2026 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2028 * include/bits/basic_string.h: Fix iterator/index confusion in
2030 * include/bits/range_access.h: Fix Doxygen warnings.
2031 * include/bits/refwrap.h: Do not document implementation details.
2032 (ref, cref): Group docs with reference_wrapper.
2033 * include/std/fstream: Fix Doxygen markup.
2034 * libsupc++/initializer_list (begin, end): Group docs with
2037 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2039 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2040 * include/std/mutex: Likewise.
2041 * include/std/shared_mutex: Likewise.
2043 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2044 * include/bits/fs_fwd.h: Likewise.
2045 * include/bits/fs_ops.h: Likewise.
2046 * include/bits/fs_path.h: Likewise.
2047 * include/std/filesystem: Likewise.
2049 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2050 * include/experimental/buffer: Likewise.
2051 * include/experimental/executor: Likewise.
2052 * include/experimental/internet: Likewise.
2053 * include/experimental/io_context: Likewise.
2054 * include/experimental/net: Likewise.
2055 * include/experimental/netfwd: Likewise.
2056 * include/experimental/socket: Likewise.
2057 * include/experimental/timer: Likewise.
2059 * doc/doxygen/doxygroups.cc: Move description of experimental group
2061 * include/experimental/algorithm: Add to libfund-ts doc group.
2062 * include/experimental/any: Likewise. Do not document implementation
2064 * include/experimental/array: Add to libfund-ts doc group.
2065 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2066 for Library Fundamentals.
2067 * include/experimental/chrono: Add to libfund-ts doc group.
2068 * include/experimental/deque: Likewise.
2069 * include/experimental/forward_list: Likewise.
2070 * include/experimental/functional: Likewise.
2071 * include/experimental/iterator: Likewise.
2072 * include/experimental/list: Likewise.
2073 * include/experimental/map: Likewise.
2074 * include/experimental/memory: Likewise.
2075 * include/experimental/memory_resource: Likewise. Improve docs.
2077 * include/experimental/numeric: Add to libfund-ts doc group.
2078 * include/experimental/optional: Likewise.
2079 * include/experimental/propagate_const: Likewise.
2080 * include/experimental/random: Likewise.
2081 * include/experimental/ratio: Likewise.
2082 * include/experimental/regex: Likewise.
2083 * include/experimental/set: Likewise.
2084 * include/experimental/source_location: Likewise.
2085 * include/experimental/string: Likewise.
2086 * include/experimental/string_view: Likewise.
2087 * include/experimental/system_error: Likewise.
2088 * include/experimental/tuple: Likewise.
2089 * include/experimental/type_traits: Likewise.
2090 * include/experimental/unordered_map: Likewise.
2091 * include/experimental/unordered_set: Likewise.
2092 * include/experimental/utility: Likewise.
2093 * include/experimental/vector: Likewise.
2094 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2095 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2096 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2098 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2099 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2100 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2101 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2102 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2104 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2105 * include/experimental/bits/fs_fwd.h: Improve docs.
2106 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2107 * include/experimental/bits/fs_path.h: Likewise.
2108 (path, filesystem_error, u8path): Improve docs.
2109 * include/experimental/filesystem: Link to docs for TS.
2111 * config/allocator/new_allocator_base.h (__allocator_base): Add
2112 workaround for Doxygen bug #6945.
2113 * include/std/memory: Improve docs. Define group for pointer safety.
2114 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2115 conditional to suppress documentation for implementation details.
2117 * include/bits/specfun.h: Improve docs.
2118 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2121 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2122 (std::experimental): Add docs.
2123 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2124 namespace to nothing when generating docs.
2125 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2126 * include/std/chrono (std::chrono): Likewise.
2127 * include/std/functional (std::placeholders): Likewise.
2128 * include/std/thread (std::this_thread): Likewise.
2130 * include/parallel/settings.h: Fix Doxygen markup.
2132 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2133 anything unless PB_DS_CLASS_C_DEC is defined.
2134 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2135 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2136 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2137 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2138 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2139 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2140 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2142 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2143 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2144 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2145 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2146 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2147 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2148 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2149 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2150 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2151 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2152 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2154 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2155 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2157 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2160 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2161 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2162 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2165 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2167 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2168 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2169 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2170 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2171 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2172 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2174 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2175 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2178 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2181 * include/std/complex (__complex_proj): Return parameter unchanged.
2182 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2183 floating-point types to take std::complex arguments.
2184 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2185 floating-point types.
2186 * testsuite/26_numerics/complex/proj.cc: New test.
2188 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2190 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2191 to _Lock_policyE[012].
2192 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2194 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2196 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2197 macros accidentally left in.
2198 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2199 unnecessary -lstdc++fs option. Fix test for mingw.
2200 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2203 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2205 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2207 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2209 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2211 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2212 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2215 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2217 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2220 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2221 class template and partial specialization.
2224 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2226 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2227 functions to convert a value to an integral type.
2228 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2229 (fill_n): Convert _Size parameter to an integral type.
2230 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2231 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2232 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2233 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2234 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2235 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2237 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2239 Adding noexcept-specification on tuple constructors (LWG 2899)
2240 * libstdc++-v3/include/std/tuple:
2241 (tuple()): Add noexcept-specification.
2242 (tuple(const _Elements&...)): Likewise
2243 (tuple(_UElements&&...)): Likewise
2244 (tuple(const tuple<_UElements...>&)): Likewise
2245 (tuple(tuple<_UElements...>&&)): Likewise
2246 (tuple(const _T1&, const _T2&)): Likewise
2247 (tuple(_U1&&, _U2&&)): Likewise
2248 (tuple(const tuple<_U1, _U2>&): Likewise
2249 (tuple(tuple<_U1, _U2>&&): Likewise
2250 (tuple(const pair<_U1, _U2>&): Likewise
2251 (tuple(pair<_U1, _U2>&&): Likewise
2252 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2254 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2257 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2258 arguments with __restrict.
2260 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2262 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2264 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2266 * include/experimental/bits/fs_path.h
2267 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2268 avoid redundant call to _S_convert_loc with non-const pointers.
2270 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2271 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2272 * testsuite/21_strings/basic_string/hash/hash.cc
2273 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2274 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2275 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2277 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2278 wstring::_M_replace_dispatch with more specific patterns.
2279 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2280 Create const std::string to avoid redundant call to _S_convert_loc
2281 with non-const pointers.
2282 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2283 avoid unnecessary basic_string::assign instantiations.
2285 * include/std/memory (__uses_alloc_args): Add string-literal to
2286 static_assert, to match the one in __uses_alloc.
2287 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2288 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2289 for recursive uses-allocator construction of nested pairs.
2290 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2293 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2295 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2296 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2297 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2298 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2300 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2301 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2302 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2303 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2304 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2305 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2306 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2308 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2311 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2312 * include/std/scoped_allocator [__cplusplus > 201703L]
2313 (scoped_allocator_adaptor::construct): Define in terms of
2314 uses_allocator_construction_args, as per P0591R4.
2315 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2316 * testsuite/util/testsuite_allocator.h: Remove name of unused
2319 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2321 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2322 * doc/html/*: Regenerate.
2324 * include/bits/fs_path.h (operator<, operator<=, operator>)
2325 (operator>=, operator==, operator!=): Make hidden friends, as per
2327 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2328 string type in test.
2329 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2331 * include/std/any (any::any(ValueType&&)): Use __and_v.
2332 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2335 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2337 * include/std/type_traits (__result_of_memfun): Use remove_reference
2338 instead of __remove_cvref_t and remove redundant is_same check.
2339 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2341 * include/experimental/string_view (basic_string_view::pointer)
2342 (basic_string_view::reference): Fix to refer to non-const value_type.
2343 * include/bits/basic_string.h (basic_string): Use __sv_check and
2344 __sv_limit instead of basic_string_view::_M_check and
2345 basic_string_view::_M_limit.
2346 * include/std/string_view (__sv_check, __sv_limit): New
2347 helper functions to replace basic_string_view::_M_check and
2348 basic_string_view::_M_limit.
2349 (basic_string_view): Add static assertions to enforce ill-formed
2350 requirement for traits_type::char_type from P1148R0, and to enforce
2351 required properties of char-like types.
2352 (basic_string_view::pointer, basic_string_view::reference): Fix to
2353 refer to non-const value_type.
2354 (basic_string_view::operator[], basic_string_view::at)
2355 (basic_string_view::front, basic_string_view::back)
2356 (basic_string_view::data): Use const_reference and const_pointer
2357 typedefs for return types.
2358 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2359 (hash<wstring_view>): Fix argument_type typedef.
2360 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2361 char/1.cc: Fix expected return type of basic_string_view::data().
2362 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2363 wchar_t/1.cc: Likewise.
2364 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2365 char/1.cc: Likewise.
2366 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2367 wchar_t/1.cc: Likewise.
2368 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2370 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2371 Check reference and pointer typedefs.
2372 * testsuite/experimental/string_view/requirements/typedefs.cc:
2374 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2375 Fix expected return type of basic_string_view::data().
2376 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2378 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2380 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2384 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2385 Avoid a runtime check for types that can never be stored in std::any.
2386 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2389 PR libstdc++/90220 (partial)
2390 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2391 not attempt ill-formed static_cast to pointers to non-object types.
2392 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2395 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2396 prevent -Wcatch-value warning.
2398 * include/std/variant (__variant_construct): Use template parameter
2399 type instead of equivalent decltype-specifier.
2400 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2401 Replace forward with move.
2402 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2403 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2404 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2405 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2406 index after construction succeeds.
2407 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2408 if-constexpr checks that are always true. Use __remove_cvref_t instead
2409 of remove_reference so that is_nothrow_move_constructible check
2410 doesn't use a const rvalue parameter. In the potentially-throwing case
2411 construct a temporary and move assign it, as per LWG 2904.
2412 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2413 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2414 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2415 construct a temporary and move assign from it, as per LWG 2904.
2416 * testsuite/20_util/variant/exception_safety.cc: Check that
2417 assignment operators have strong exception safety guarantee.
2419 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2421 Document PSTL linker flags
2423 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2425 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2427 * include/std/variant (__detail::__variant::_Traits): Make
2428 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2429 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2431 (__detail::__variant::_Copy_assign_alias): Only depend on
2432 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2433 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2434 move assignment operators.
2437 * include/std/variant (variant::__not_self): New helper for the
2438 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2439 (variant::__to_type_impl): Remove.
2440 (variant::__to_type): Add default argument to check pack size, instead
2441 of using __to_type_impl.
2442 (variant::__accepted_type): Add default argument using __not_self.
2443 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2444 for variant(T&&) constructor constraint.
2445 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2446 Extract __accepted_type into a named template parameter for reuse in
2447 other constraints and in the exception specification.
2448 (variant::variant(in_place_type_t<T>, Args&&...))
2449 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2450 (variant::variant(in_place_index_t<T>, Args&&...))
2451 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2452 (variant::operator=T&&)): Remove redundant && from trait arguments.
2453 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2454 isn't used for in_place_type or in_place_index arguments.
2456 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2457 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2458 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2460 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2461 Bernd Edlinger <bernd.edlinger@hotmail.de>
2462 Jakub Jelinek <jakub@redhat.com>
2465 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2466 general-regs-only target attribute for ARM.
2468 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2471 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2472 specialization also depend on is_nothrow_move_constructible.
2473 * include/std/variant (__detail::__variant::__never_valueless()):
2474 Only true if the variant would have a move assignment operator.
2475 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2476 Check __never_valueless<T...>().
2477 (variant::emplace): Only perform non-throwing move assignments
2478 for never-valueless alternatives if the variant has a move assignment
2480 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2481 types can be emplaced into non-assignable variants.
2482 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2483 don't get copied when emplaced into non-assignable variants.
2485 * include/std/variant (__detail::__variant::__ref_cast): Remove
2487 (__detail::__variant::_Uninitialized::_M_get)
2488 (__detail::__variant::__get)
2489 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2491 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2493 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2495 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2496 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2497 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2498 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2500 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2502 Delegate PSTL configuration to pstl/pstl_config.h
2504 * include/bits/c++config: Remove explicit PSTL configuration
2505 macros and use definitions from <pstl/pstl_config.h>.
2507 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2509 Cleanup algorithm implementations
2510 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2512 (mismatch): Forward execution policy.
2513 (equal): Qualify call to std::equal().
2514 (partial_sort): Forward execution policy.
2515 (inplace_merge): Forward execution policy.
2517 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2519 Improve implementation of parallel equal()
2520 * include/pstl/algorithm_impl.h
2521 (__internal::__brick_equal): use "4 iterator" version of
2523 (__internal::__brick_equal): use simd for random access
2524 iterators on unsequenced execution policies.
2525 (__internal::__pattern_equal): add "4 iterator" version
2526 (__internal::__pattern_equal): dispatch to simd __brick_equal
2527 for vector-only execution policies.
2528 (__internal::__pattern_equal): dispatch to __parallel_or for
2529 parallel execution policies.
2530 * include/pstl/glue_algorithm_impl.h
2531 (std::equal): dispatch to "4 iterator" version of
2532 __internal::__pattern_equal().
2534 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2537 * include/bits/forward_list.h (operator==): Do not use operator!= to
2539 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2540 earlier in the list, so that sort is stable.
2541 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2542 * testsuite/23_containers/forward_list/comparable.cc: Test with
2543 types that meet the minimum EqualityComparable and LessThanComparable
2544 requirements. Remove irrelevant comment.
2546 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2547 Do not depend on whether all alternative types are move constructible.
2548 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2549 from the operand when deciding whether to perform the assignment.
2550 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2551 with deleted move constructor and deleted move assignment operator.
2552 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2553 behaviour of variants with DeletedMoves as an alternative.
2554 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2555 (move_ctor, move_assign): Check that moving a variant with a
2556 DeletedMoves alternative falls back to copying instead of moving.
2558 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2559 from static_assert declarations.
2561 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2562 actually match its name.
2563 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2564 (test_swap()): Fix result for MoveCtorOnly and check
2565 MoveCtorAndSwapOnly.
2567 * include/std/optional (optional::value_or(U&&) &&): Add missing
2568 constexpr specifier.
2569 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2570 for disengaged optionals and rvalue optionals.
2571 * testsuite/20_util/optional/observers/4.cc: Likewise.
2573 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2575 * include/pstl/algorithm_impl.h: Uglify identfiers.
2576 * include/pstl/numeric_impl.h: Uglify identfiers.
2577 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2579 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2581 * include/bits/c++config:
2582 Add definition for __PSTL_ASSERT.
2583 Add definition for __PSTL_ASSERT_MSG.
2584 * include/pstl/algorithm_impl.h: Replace use of assert().
2585 * include/pstl/numeric_impl.h: Replace use of assert().
2586 * include/pstl/parallel_backend_tbb.h:
2587 Replace use of assert().
2588 Replace use of __TBB_ASSERT().
2589 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2591 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2594 * src/c++17/memory_resource.cc
2595 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2596 needed to allow placing a _Chunk at the end of the buffer.
2597 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2599 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2601 * doc/xml/faq.xml: Add information about emergency EH pool.
2602 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2603 Move outdated information on mt_allocator to a separate section.
2604 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2605 doesn't affect the default allocator.
2607 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2611 * testsuite/20_util/variant/89851.cc: New test.
2613 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2615 * include/std/variant: Adjust whitespace. Add comments.
2616 (_Multi_array): Leave primary template undefined.
2617 (_Multi_array<_Tp>): Define partial specialization for base case of
2619 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2620 which is always a reference.
2621 (__gen_vtable::_S_apply()): Remove function, inline body into
2622 default member initializer.
2623 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2625 * include/std/variant (__variant_idx_cookie): Add member type.
2626 (__visitor_result_type): Remove.
2627 (__do_visit): Use invoke_result instead of __visitor_result_type.
2628 * testsuite/20_util/variant/visit.cc: New test.
2631 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2633 * testsuite/20_util/variant/90008.cc: New test.
2635 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2637 * include/pstl/algorithm_impl.h: Add namespace qualification.
2638 * include/pstl/execution_defs.h: Add namespace qualification.
2639 * include/pstl/execution_impl.h: Add namespace qualification.
2640 * include/pstl/numeric_impl.h: Add namespace qualification.
2641 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2642 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2643 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2645 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2647 Fix visit<R> for variant.
2648 * include/std/variant (__do_visit): Add a template parameter
2649 for enforcing same return types for visit.
2650 (__gen_vtable_impl): Likewise.
2651 (_S_apply_single_alt): Adjust.
2652 (__visit_invoke_impl): New. Handle casting to void.
2653 (__do_visit_invoke): New. Enforces same return types.
2654 (__do_visit_invoke_r): New. Converts return types.
2655 (__visit_invoke): Adjust.
2656 (__gen_vtable): Add a template parameter for enforcing
2657 same return types for visit.
2658 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2659 different return types.
2660 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2661 visitors with different return types don't accidentally
2662 compile with regular visitation.
2664 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2666 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2667 dg-require-filesystem-ts.
2669 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2671 * doc/xml/manual/status_cxx2020.xml: Update status.
2672 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2673 * testsuite/20_util/variant/visit_r.cc: New test.
2675 * include/bits/fs_dir.h (directory_iterator::operator*)
2676 (directory_iterator::operator->): Add noexcept.
2677 (operator==, operator!=): Replace namespace-scope equality operators
2678 for directory iterators with hidden friends.
2681 * config/abi/pre/gnu.ver: Add missing exports.
2682 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2685 * config/abi/pre/gnu.ver: Export new symbols.
2686 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2687 (recursive_directory_iterator::recursion_pending())
2688 (recursive_directory_iterator::disable_recursion_pending()): Remove
2689 inline definitions. Make noexcept.
2690 (recursive_directory_iterator::depth())
2691 (recursive_directory_iterator::operator*())
2692 (recursive_directory_iterator::operator->()): Make noexcept.
2693 (recursive_directory_iterator::_M_options)
2694 (recursive_directory_iterator::_M_pending): Remove data members.
2695 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2696 (recursive_directory_iterator::recursive_directory_iterator): Remove
2697 ctor-initializer. Use new constructor for _Dir_stack.
2698 (recursive_directory_iterator::options())
2699 (recursive_directory_iterator::recursion_pending())
2700 (recursive_directory_iterator::disable_recursion_pending()): Add
2701 non-inline definitions.
2702 (recursive_directory_iterator::depth()): Make noexcept.
2703 (recursive_directory_iterator::increment(error_code&))
2704 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2705 location of options and recursion_pending members.
2706 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2707 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2708 user-declared move constructor and assignment operator, to make the
2711 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2712 d_type == DT_UNKNOWN immediately.
2713 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2715 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2717 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2719 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2720 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2723 PR libstdc++/87431 (again)
2724 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2725 Define partial specialization for basic_string.
2726 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2727 shared_ptr and weak_ptr.
2728 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2730 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2732 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2734 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2736 * include/std/any (_Never_valueless_alt): Define explicit
2737 specialization for any.
2738 * include/std/variant (_Never_valueless_alt): Define primary template.
2739 (__never_valueless): Use _Never_valueless_alt instead of
2740 is_trivially_copyable.
2741 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2742 initializations to avoid try-catch overhead. Add special case for
2743 scalars produced by potentially-throwing conversions. Use
2744 _Never_valueless_alt instead of is_trivially_copyable for the
2745 remaining strong exception-safety cases.
2746 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2747 * testsuite/20_util/variant/87431.cc: Run both test functions.
2748 * testsuite/20_util/variant/exception_safety.cc: New test.
2749 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2750 so the variant becomes valueless.
2752 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2755 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2757 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2759 * include/std/string (__hash_string_base): New class template defining
2760 operator() for hashing strings.
2761 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2762 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2763 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2764 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2766 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2768 Use single-visitation in variant assignment and swap and relops.
2769 Also use indices instead of types when checking whether
2770 variants hold the same thing.
2771 * include/std/variant (__do_visit): Add a template parameter
2772 for index visitation, invoke with indices if index visitation
2774 (__variant_idx_cookie): New.
2775 (__visit_with_index): Likewise.
2776 (_Copy_assign_base::operator=): Do single-visitation with
2778 (_Move_assign_base::operator=): Likewise.
2779 (_Extra_visit_slot_needed): Adjust.
2780 (__visit_invoke): Call with indices if it's an index visitor.
2781 (relops): Do single-visitation with an index visitor.
2783 (__visitor_result_type): New.
2785 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2787 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2789 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2791 Don't revisit a variant we are already visiting.
2792 * include/std/variant (__variant_construct_single): New.
2793 (__variant_construct): Use it.
2794 (_M_destructive_move): Likewise.
2795 (_M_destructive_copy): Likewise.
2796 (_Copy_assign_base::operator=): Adjust.
2797 (_Move_assign_base::operator=): Likewise.
2800 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2803 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2804 destructor so they are not evaluated until the _Key type is complete.
2805 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2806 * testsuite/23_containers/set/85965.cc: New test.
2807 * testsuite/23_containers/unordered_set/85965.cc: New test.
2808 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2809 with regexp matching the corresponding _Rb_tree specialization.
2810 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2811 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2812 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2813 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2814 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2815 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2816 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2818 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2821 Fix based on a suggestion by Antony Polukhin.
2822 * include/std/variant (__never_valueless): New.
2824 (_Extra_visit_slot_needed): New.
2825 (_Multi_array): Use it.
2826 (_S_apply_all_alts): Likewise.
2828 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2831 Fix based on a suggestion by Antony Polukhin.
2832 * include/std/variant (__gen_vtable): Don't reserve an
2833 additional table slot, _Multi_array already does that.
2835 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2838 Fix based on a suggestion by Antony Polukhin.
2839 * include/std/variant (__variant_construct): Capture a pointer
2840 to the storage and visit just one variant.
2842 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
2844 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2845 Doxygen-generated pages with unstable URL.
2846 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2847 * doc/xml/manual/extensions.xml: Likewise.
2848 * doc/xml/manual/parallel_mode.xml: Likewise.
2849 * doc/xml/manual/support.xml: Likewise.
2851 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2852 avoid -Wconversion warnings.
2854 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
2856 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2857 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2858 (allstamped): Add stamp-pstl.
2859 (install-headers): Add ptsl_builddir.
2860 * include/Makefile.in: Regenerate.
2861 * include/bits/c++config: Add pstl configuration.
2862 * include/pstl/LICENSE.txt: New file.
2863 * include/pstl/algorithm_fwd.h: New file.
2864 * include/pstl/algorithm_impl.h: New file.
2865 * include/pstl/execution_defs.h: New file.
2866 * include/pstl/execution_impl.h: New file.
2867 * include/pstl/glue_algorithm_defs.h: New file.
2868 * include/pstl/glue_algorithm_impl.h: New file.
2869 * include/pstl/glue_execution_defs.h: New file.
2870 * include/pstl/glue_memory_defs.h: New file.
2871 * include/pstl/glue_memory_impl.h: New file.
2872 * include/pstl/glue_numeric_defs.h: New file.
2873 * include/pstl/glue_numeric_impl.h: New file.
2874 * include/pstl/memory_impl.h: New file.
2875 * include/pstl/numeric_fwd.h: New file.
2876 * include/pstl/numeric_impl.h: New file.
2877 * include/pstl/parallel_backend.h: New file.
2878 * include/pstl/parallel_backend_tbb.h: New file.
2879 * include/pstl/parallel_backend_utils.h: New file.
2880 * include/pstl/parallel_impl.h: New file.
2881 * include/pstl/pstl_config.h: New file.
2882 * include/pstl/unseq_backend_simd.h: New file.
2883 * include/pstl/utils.h: New file.
2884 * include/std/algorithm: Include parallel algorithm implementations.
2885 * include/std/execution: New file.
2886 * include/std/memory: Include parallel algorithm implementations.
2887 * include/std/numeric: Include parallel algorithm implementations.
2888 * include/std/version: Add parallel algorithms feature test macro.
2889 * testsuite/util/pstl/pstl_test_config.h: New file.
2890 * testsuite/util/pstl/test_utils.h: New file.
2891 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2892 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2893 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2894 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2895 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2896 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2897 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2898 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2899 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2900 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2901 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2902 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2903 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2904 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2905 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2906 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2907 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2908 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2909 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2910 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2911 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2912 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2913 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2914 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2915 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2916 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2917 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2918 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2919 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2920 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2921 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2922 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2923 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2924 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2925 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2926 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2927 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2928 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2929 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2930 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2931 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2932 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2933 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2934 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2935 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2936 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2937 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2938 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2939 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2940 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2941 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2942 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2943 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2944 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2945 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2946 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2947 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2948 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2949 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2950 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2951 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2952 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2953 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2954 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2955 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2956 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2957 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2958 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2959 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2960 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2961 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2962 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2963 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2964 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2965 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2966 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2967 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2968 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2969 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2970 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2971 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2972 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2973 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2974 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2975 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2976 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2977 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2978 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2979 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2980 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2981 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2982 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2983 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2984 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2985 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2986 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2987 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2988 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2989 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2990 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2991 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2992 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2993 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2994 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2995 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2996 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2998 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3000 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3001 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3002 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3003 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3004 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3005 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3006 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3007 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3008 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3009 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3010 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3011 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3012 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3013 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3014 when the special functions IS is enabled, not for C++17.
3015 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3017 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3018 without checks for special functions in C++17.
3019 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3023 * include/backward/hash_map: Use <> for includes not "".
3024 * include/backward/hash_set: Likewise.
3025 * include/backward/strstream: Likewise.
3026 * include/tr1/bessel_function.tcc: Likewise.
3027 * include/tr1/exp_integral.tcc: Likewise.
3028 * include/tr1/legendre_function.tcc: Likewise.
3029 * include/tr1/modified_bessel_func.tcc: Likewise.
3030 * include/tr1/riemann_zeta.tcc: Likewise.
3032 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3034 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3035 of extension allocators.
3036 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3037 Document new headers in 7.2, 8.1 and 9.1 releases.
3038 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3039 * doc/html/*: Regenerate.
3041 2019-03-12 John David Anglin <dave.anglin@bell.net>
3044 * testsuite/lib/libstdc++.exp: Locate libatomic.
3045 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3046 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3048 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3049 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3050 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3051 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3053 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3056 * configure.ac: Check for sockatmark.
3057 * crossconfig.m4: Check for sockatmark.
3058 * config.h.in: Regenerate.
3059 * configure: Regenerate.
3060 * include/experimental/internet (address_v4::_S_hton): Rename
3061 overloaded functions to _S_hton_16 and _S_ntoh_16.
3062 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3063 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3064 * include/experimental/socket (basic_socket::at_mark): Check
3065 _GLIBCXX_HAVE_SOCKATMARK.
3067 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3068 const variables instead of macros.
3071 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3072 Use correct type for len_aligned.
3073 * testsuite/20_util/hash/89629.cc: New test.
3075 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3078 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3079 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3080 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3081 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3082 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3083 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3084 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3085 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3086 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3087 memory_order_seq_cst to int.
3089 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3091 * doc/xml/manual/using.xml: Use link element instead of xref.
3092 * doc/html/*: Regenerate.
3094 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3096 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3099 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3100 parameters in deduction guides.
3101 * include/debug/multimap.h (multimap): Likewise.
3102 * include/debug/set.h (multimap): Likewise.
3103 * include/debug/multiset.h (multimap): Likewise.
3104 * include/debug/unordered_map (unordered_map): Likewise.
3105 (unordered_multimap): Likewise.
3106 * include/debug/unordered_set (unordered_set): Likewise.
3107 (unordered_multiset): Likewise.
3110 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3111 Invalidate all iterators in case of rehash.
3112 (unordered_multimap<>::_M_check_rehashed): Likewise.
3113 * include/debug/unordered_set
3114 (unordered_set<>::_M_check_rehashed): Likewise.
3115 (unordered_multiset<>::_M_check_rehashed): Likewise.
3116 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3118 2019-03-07 Andreas Schwab <schwab@suse.de>
3120 * config/abi/post/riscv64-linux-gnu: New directory.
3121 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3123 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3125 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3126 compile test to run. Fix typo.
3128 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3129 * doc/html/*: Regenerate.
3131 P0356R5 Simplified partial function application
3132 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3133 helpers for bind_front.
3134 (bind_front, __cpp_lib_bind_front): Define.
3135 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3137 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3139 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3140 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3141 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3142 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3144 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3146 PR libstdc++/86655 - std::assoc_legendre should not constrain
3147 the value of m (or x).
3148 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3149 __sph_legendre): If degree > order Don't throw, return 0.
3150 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3151 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3152 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3153 * testsuite/tr1/5_numerical_facilities/special_functions/
3154 02_assoc_legendre/pr86655.cc: New test.
3155 * testsuite/tr1/5_numerical_facilities/special_functions/
3156 22_sph_legendre/pr86655.cc: New test.
3158 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3161 Also PR libstdc++/85517
3162 * include/std/variant (__do_visit): New.
3163 (__variant_cast): Likewise.
3164 (__variant_cookie): Likewise.
3165 (__erased_*): Remove.
3166 (_Variant_storage::_S_vtable): Likewise.
3167 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3168 (_Variant_storage::__M_reset): Adjust.
3169 (__variant_construct): New.
3170 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3171 __variant_construct.
3172 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3173 (_Move_ctor_base::__M_destructive_copy): New.
3174 (_Move_ctor_base::__M_destructive_move): Adjust to use
3175 __variant_construct.
3176 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3177 (_Copy_assign_alias): Adjust to check both copy assignment
3178 and copy construction for triviality.
3179 (_Move_assign_base::operator=): Adjust to use __do_visit.
3180 (_Multi_array): Add support for visitors that accept and return
3182 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3183 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3184 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3185 a __variant_cookie temporary for a variant that is valueless and..
3186 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3187 (__gen_vtable::_Array_type): Conditionally make space for
3188 the __variant_cookie visitor case.
3189 (__variant_construct_by_index): New.
3190 (get_if): Adjust to use std::addressof.
3191 (relops): Adjust to use __do_visit.
3192 (variant): Add __variant_cast and __variant_construct_by_index
3194 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3195 instead of self-destruction.
3196 (variant::swap): Adjust to use __do_visit.
3197 (visit): Reimplement in terms of __do_visit.
3198 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3199 * testsuite/20_util/variant/compile.cc: Adjust.
3200 * testsuite/20_util/variant/run.cc: Likewise.
3202 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3204 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3206 * testsuite/experimental/feat-char8_t.cc: Likewise.
3208 * include/std/type_traits [C++20] (is_bounded_array)
3209 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3211 * testsuite/20_util/is_bounded_array/requirements/
3212 explicit_instantiation.cc: New test.
3213 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3215 * testsuite/20_util/is_bounded_array/value.cc: New test.
3216 * testsuite/20_util/is_unbounded_array/requirements/
3217 explicit_instantiation.cc: New test.
3218 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3220 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3222 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3224 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3226 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3228 * include/c_compatibility/math.h [C++20] (lerp): Add using
3230 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3231 (__lerp): Define function template to implement lerp.
3232 (lerp(float, float, float), lerp(double, double, double))
3233 (lerp(long double, long double, long double)): Define for C++20.
3234 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3235 (midpoint(T, T), midpoint(T*, T*)): Define.
3236 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3237 * testsuite/26_numerics/lerp.cc: New test.
3238 * testsuite/26_numerics/midpoint/floating.cc: New test.
3239 * testsuite/26_numerics/midpoint/integral.cc: New test.
3240 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3242 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3244 PR libstdc++/88996 Implement P0439R0
3245 Make std::memory_order a scoped enumeration.
3246 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3247 add variables for the old enumerators. Adjust calls.
3248 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3249 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3251 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3253 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3256 * include/std/memory_resource (polymorphic_allocator): Add default
3257 template argument for C++20.
3258 (polymorphic_allocator::allocate_bytes)
3259 (polymorphic_allocator::deallocate_bytes)
3260 (polymorphic_allocator::allocate_object)
3261 (polymorphic_allocator::deallocate_object)
3262 (polymorphic_allocator::new_object)
3263 (polymorphic_allocator::delete_object): New member functions for
3265 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3268 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3271 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3274 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3276 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3277 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3279 * include/std/memory (uses_allocator_construction_args): New set of
3280 overloaded functions.
3281 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3283 * include/std/memory_resource (polymorphic_allocator::construct)
3284 [__cplusplus > 201703l]: Replace all overloads with a single function
3285 using uses_allocator_construction_args.
3286 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3288 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3290 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3293 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3294 stylesheet directories before check for xsltproc. Try to use
3295 xmlcatalog to find local stylesheet directory before trying hardcoded
3296 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3297 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3298 use xsltproc if xmlcatalog fails to find a local stylesheet.
3299 * configure.ac: Check for xmlcatalog.
3300 * Makefile.in: Regenerate.
3301 * configure: Likewise.
3302 * doc/Makefile.in: Likewise.
3303 * include/Makefile.in: Likewise.
3304 * libsupc++/Makefile.in: Likewise.
3305 * po/Makefile.in: Likewise.
3306 * python/Makefile.in: Likewise.
3307 * src/Makefile.in: Likewise.
3308 * src/c++11/Makefile.in: Likewise.
3309 * src/c++17/Makefile.in: Likewise.
3310 * src/c++98/Makefile.in: Likewise.
3311 * src/filesystem/Makefile.in: Likewise.
3312 * testsuite/Makefile.in: Likewise.
3314 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3317 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3318 container deduction guides.
3319 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3320 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3321 parameters in deduction guides.
3322 * include/bits/stl_multimap.h (multimap): Likewise.
3323 * include/bits/stl_multiset.h (multiset): Likewise.
3324 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3325 * include/bits/stl_set.h (set): Likewise.
3326 * include/bits/stl_stack.h (stack): Likewise.
3327 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3328 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3329 constrain parameters in deduction guides.
3330 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3332 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3334 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3335 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3336 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3337 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3339 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3341 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3344 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3345 to class template and partial specialization using void_t.
3346 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3348 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3351 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3352 copy and move members public.
3354 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3356 * include/std/type_traits (__underlying_type_impl): New helper to
3357 make underlying_type SFINAE-friendly.
3358 (underlying_type): Derive from __underlying_type_impl.
3359 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3363 * include/bits/char_traits.h (__constant_char_array): Check index is
3364 in range before dereferencing.
3365 (char_traits<char>::compare, char_traits<char>::find)
3366 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3367 immediately if n is zero.
3368 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3369 Remove workarounds for PR 67026.
3370 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3372 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3375 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3377 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3378 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3380 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3383 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3384 type to std::size_t and argument to type to long double.
3386 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3388 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3389 * config/abi/post/sparc64-linux-gnu: New directory.
3390 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3391 * config/abi/post/sparc64-linux-gnu/32: New directory.
3392 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3394 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3396 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3397 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3400 2019-02-22 Tom Honermann <tom@honermann.net>
3402 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3403 printers for u8string and u8string_view.
3405 2019-02-22 Tom Honermann <tom@honermann.net>
3407 * testsuite/18_support/byte/ops.cc: Validate
3408 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3409 std::to_integer<char32_t>.
3410 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3411 std::numeric_limits<char8_t>.
3412 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3413 std::numeric_limits<char8_t>::lowest().
3414 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3415 std::numeric_limits<char8_t>::max_digits10.
3416 * testsuite/18_support/type_info/fundamental.cc: Validate
3417 typeinfo for char8_t.
3418 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3419 std::from_chars with char8_t.
3420 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3421 Validate explicit instantiation of std::hash<char8_t>.
3422 * testsuite/20_util/is_integral/value.cc: Validate
3423 std::is_integral<char8_t>.
3424 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3425 Validate std::make_signed<char8_t>.
3426 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3427 Validate u8string construction from char8_t sources.
3428 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3430 * testsuite/21_strings/basic_string_view/operations/compare/
3431 char/70483.cc: Validate substr operations on u8string_view.
3432 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3433 the u8string_view typedef is defined.
3434 * testsuite/21_strings/char_traits/requirements/
3435 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3437 * testsuite/21_strings/char_traits/requirements/
3438 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3439 constexpr member functions.
3440 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3441 that the u8string typedef is defined.
3442 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3443 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3444 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3445 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3447 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3448 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3450 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3451 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3452 Validate std::atomic<char8_t>::is_always_lock_free
3453 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3454 Update line numbers.
3455 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3457 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3459 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3460 Validate std::experimental::pmr::u8string.
3461 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3462 u8string_view typedef is defined.
3463 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3464 char32_t to the typelists.
3466 2019-02-22 Tom Honermann <tom@honermann.net>
3468 * include/ext/typelist.h: Constrain a partial specialization of
3469 typelist::detail::append_ to only match chain<T1,T2>.
3471 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3474 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3475 class template with class. Replace move and copy member types with
3476 member alias templates, so they are only instantiated when needed.
3477 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3478 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3479 test for C++11/14/17 as well.
3480 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3483 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3486 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3487 _GLIBCXX_PURE to the alias declaration.
3489 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3491 * testsuite/21_strings/basic_string/literals/types.cc
3492 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3493 * testsuite/21_strings/basic_string/literals/values.cc
3494 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3495 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3496 potentially having different type.
3497 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3498 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3500 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3501 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3502 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3503 string literals only using basic character set.
3504 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3505 u8 literals to char.
3506 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3507 Test ATOMIC_CHAR8_T_LOCK_FREE.
3508 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3509 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3510 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3511 * testsuite/experimental/string_view/literals/types.cc
3512 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3514 * testsuite/experimental/string_view/literals/values.cc
3515 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3517 2019-02-19 Tom Honermann <tom@honermann.net>
3519 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3520 from char16_32_t.cc; validates numeric_limits<char8_t>.
3521 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3522 test cloned from types.cc; validates operator""s for char8_t
3524 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3525 test cloned from values.cc; validates construction and comparison
3527 * testsuite/21_strings/basic_string/requirements/
3528 /explicit_instantiation/char8_t/1.cc: New test cloned from
3529 char16_t/1.cc; validates explicit instantiation of
3530 basic_string<char8_t>.
3531 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3532 New test cloned from types.cc; validates operator""sv for char8_t
3533 returns u8string_view.
3534 * testsuite/21_strings/basic_string_view/literals/
3535 values-char8_t.cc: New test cloned from values.cc; validates
3536 construction and comparison of u8string_view values.
3537 * testsuite/21_strings/basic_string_view/requirements/
3538 explicit_instantiation/char8_t/1.cc: New test cloned from
3539 char16_t/1.cc; validates explicit instantiation of
3540 basic_string_view<char8_t>.
3541 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3542 New test cloned from char16_t/65049.cc; validates that
3543 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3544 * testsuite/21_strings/char_traits/requirements/char8_t/
3545 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3546 that char_traits<char8_t> member typedefs are present and correct.
3547 * testsuite/21_strings/char_traits/requirements/
3548 explicit_instantiation/char8_t/1.cc: New test cloned from
3549 char16_t/1.cc; validates explicit instantiation of
3550 char_traits<char8_t>.
3551 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3552 from char16_t.cc: validates
3553 codecvt<char16_t, char8_t, mbstate_t>.
3554 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3555 from char32_t.cc: validates
3556 codecvt<char32_t, char8_t, mbstate_t>.
3557 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3558 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3559 codecvt<char32_t, char8_t, std::mbstate_t>.
3560 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3561 test cloned from string.cc; validates filesystem::path construction
3563 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3564 the __cpp_lib_char8_t feature test macro is defined with the
3566 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3567 New test cloned from string.cc; validates filesystem::path
3568 construction from char8_t input.
3569 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3570 test cloned from types.cc; validates operator""sv for char8_t
3571 returns u8string_view.
3572 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3573 New test cloned from values.cc; validates construction and
3574 comparison of u8string_view values.
3575 * testsuite/experimental/string_view/requirements/
3576 explicit_instantiation/char8_t/1.cc: New test cloned from
3577 char16_t/1.cc; validates explicit instantiation of
3578 basic_string_view<char8_t>.
3579 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3580 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3583 2019-02-19 Tom Honermann <tom@honermann.net>
3585 P0482R5 char8_t: Standard library support
3586 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3587 typeinfo symbols for char8_t.
3588 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3589 (GLIBCXX_3.4.26): Add symbols for specializations of
3590 numeric_limits and codecvt that involve char8_t.
3591 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3592 * include/bits/atomic_base.h: Add atomic_char8_t.
3593 * include/bits/basic_string.h: Add std::hash<u8string> and
3594 operator""s(const char8_t*, size_t).
3595 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3597 * include/bits/char_traits.h: Add char_traits<char8_t>.
3598 * include/bits/codecvt.h: Add
3599 codecvt<char16_t, char8_t, mbstate_t>,
3600 codecvt<char32_t, char8_t, mbstate_t>,
3601 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3602 codecvt_byname<char32_t, char8_t, mbstate_t>.
3603 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3604 recognize char8_t as an integral type.
3605 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3607 (path::u8string): Return std::u8string when char8_t support is
3609 (path::generic_u8string): Likewise.
3610 (path::_S_convert): Handle conversion from char8_t input.
3611 (path::_S_str_convert): Likewise.
3612 * include/bits/functional_hash.h: Add hash<char8_t>.
3613 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3615 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3616 for new char8_t specializations.
3617 * include/bits/localefwd.h: Add missing declarations of
3618 codecvt<char16_t, char, mbstate_t> and
3619 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3620 codecvt<char16_t, char8_t, mbstate_t> and
3621 codecvt<char32_t, char8_t, mbstate_t>.
3622 * include/bits/postypes.h: Add u8streampos
3623 * include/bits/stringfwd.h: Add declarations of
3624 char_traits<char8_t> and u8string.
3625 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3626 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3628 (path::u8string): Return std::u8string when char8_t support is
3630 (path::generic_u8string): Likewise.
3631 (path::_S_convert): Handle conversion from char8_t input.
3632 (path::_S_str_convert): Likewise.
3633 * include/experimental/string: Add u8string.
3634 * include/experimental/string_view: Add u8string_view,
3635 hash<experimental::u8string_view>, and
3636 operator""sv(const char8_t*, size_t).
3637 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3638 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3639 as a character type.
3640 * include/std/limits: Add numeric_limits<char8_t>.
3641 * include/std/string_view: Add u8string_view,
3642 hash<experimental::u8string_view>, and
3643 operator""sv(const char8_t*, size_t).
3644 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3645 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3646 * libsupc++/atomic_lockfree_defines.h: Define
3647 ATOMIC_CHAR8_T_LOCK_FREE.
3648 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3649 codecvt.cc and limits.cc so that char8_t specializations of
3650 numeric_limits and codecvt and emitted.
3651 * src/c++11/Makefile.in: Likewise.
3652 * src/c++11/codecvt.cc: Define members of
3653 codecvt<char16_t, char8_t, mbstate_t>,
3654 codecvt<char32_t, char8_t, mbstate_t>,
3655 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3656 codecvt_byname<char32_t, char8_t, mbstate_t>.
3657 * src/c++11/limits.cc: Define members of
3658 numeric_limits<char8_t>.
3659 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3660 locale_init.cc and localename.cc.
3661 * src/c++98/Makefile.in: Likewise.
3662 * src/c++98/locale_init.cc: Add initialization for the
3663 codecvt<char16_t, char8_t, mbstate_t> and
3664 codecvt<char32_t, char8_t, mbstate_t> facets.
3665 * src/c++98/localename.cc: Likewise.
3666 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3668 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3670 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3671 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3672 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3674 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3676 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3677 * doc/html/*: Regenerate.
3679 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3680 * doc/html/*: Regenerate.
3682 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3683 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3684 allocator type in is_constructible checks.
3685 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3686 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3687 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3688 problematic type from LWG 2586 discussion.
3689 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3690 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3692 * configure.ac: Check for C11 timespec_get function.
3693 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3695 * config.h.in: Regenerate.
3696 * configure: Regenerate.
3697 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3698 std for C++17 and up.
3700 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3701 * include/bits/stl_queue.h
3702 (priority_queue(const Compare&, const Container&, const Alloc&))
3703 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3705 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3707 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3708 * include/bits/stl_queue.h (queue, priority_queue): Add static
3709 assertions to enforce LWG 2566 requirement on value_type.
3710 * include/bits/stl_stack.h (stack): Likewise.
3713 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3715 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3716 * include/bits/std_abs.h: Add comment about LWG 2735.
3717 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3719 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3722 * include/std/version [__cpp_impl_destroying_delete]
3723 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3724 * libsupc++/new [__cpp_impl_destroying_delete]
3725 (__cpp_lib_destroying_delete): Likewise.
3726 (destroying_delete_t, destroying_delete): Likewise, but define even
3727 when __cpp_impl_destroying_delete is not defined.
3728 * testsuite/18_support/destroying_delete.cc: New test.
3730 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3733 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3734 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3735 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3736 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3738 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3741 * include/bits/fs_path.h (path::has_root_name)
3742 (path::has_root_directory, path::has_root_path)
3743 (path::has_relative_path, path::has_parent_path)
3744 (path::has_filename, path::has_stem, path::has_extension)
3745 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3747 * src/c++17/fs_path.cc (path::has_root_name)
3748 (path::has_root_directory, path::has_root_path)
3749 (path::has_relative_path, path::has_parent_path)
3750 (path::has_filename, path::_M_find_extension): Add noexcept.
3752 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3754 PR libstdc++/89102 (partial)
3755 * include/std/type_traits (common_type<>): Define.
3756 (common_type<T>): Derive from common_type<T, T>.
3757 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3758 Test zero-length template argument list.
3759 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3760 Test additional single argument cases.
3761 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3762 Adjust expected error.
3764 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3767 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3769 * include/bits/stl_stack.h (stack): Likewise.
3770 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3771 * testsuite/23_containers/queue/deduction.cc: New test.
3772 * testsuite/23_containers/stack/deduction.cc: New test.
3775 * include/std/type_traits (__is_convertible_helper)
3776 (__is_convertible_helper<_From, _To, false>): Revert changes to
3777 support is_nothrow_convertible.
3778 (__is_nt_convertible_helper): New helper.
3779 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3781 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3782 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3785 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3786 __is_alloc_insertable_impl. Replace single type member with two
3787 members, one for each of copy and move insertable.
3788 (__is_move_insertable): New trait for internal use.
3789 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3790 (vector::_S_nothrow_relocate(true_type)): New functions to
3791 conditionally check if __relocate_a can throw.
3792 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3793 on __is_move_insertable.
3794 (vector::_S_do_relocate): New overloaded functions to conditionally
3796 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3797 based on _S_use_relocate.
3798 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3799 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3800 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3803 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3804 parameter unnamed. Add message to static assertion.
3805 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3806 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3809 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3812 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3814 (__is_bitwise_relocatable): ... to this.
3815 (__relocate_a_1): Adapt.
3816 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3817 (__is_bitwise_relocatable): ... to this.
3819 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3822 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3823 final component as well as from _M_pathname. Append the dot using
3824 operator+= instead of only to _M_pathname.
3825 (path::_M_find_extension): Reformat slightly.
3826 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3827 Add more test cases.
3829 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3831 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3833 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3835 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3836 constexpr specifiers from arg and proj.
3838 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3839 __shared_ptr instantiations used by gcc4-compatible ABI.
3841 * include/experimental/forward_list (experimental::erase): Qualify
3843 * include/experimental/list (experimental::erase): Likewise.
3844 * include/std/forward_list (std::erase): Likewise.
3845 * include/std/list (std::erase): Likewise.
3847 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3849 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3850 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3851 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3852 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3853 * testsuite/ext/array_allocator/26875.cc: Likewise.
3854 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3855 * testsuite/util/replacement_memory_operators.h: Likewise.
3856 * testsuite/util/testsuite_allocator.h: Likewise.
3858 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3859 normal mode vector, even for debug mode.
3860 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3861 Define alias template for normal mode vector.
3863 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3866 * config/locale/generic/c_locale.h (__convert_from_v)
3867 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3868 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3869 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3870 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3872 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3875 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3876 data member with static member function _S_use_relocate().
3877 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3878 (vector::_M_default_append): Use _S_use_relocate() instead of
3881 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3884 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3887 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3888 write to stderr instead of using printf.
3890 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3893 * include/bits/char_traits.h (__constant_string_p,
3894 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3897 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3899 Implement C++20 P0600r1.
3900 * include/backward/hash_map: Add nodiscard attribute to empty.
3901 * include/backward/hash_set: Likewise.
3902 * backward/hashtable.h: Likewise.
3903 * include/bits/basic_string.h: Likewise.
3904 * include/bits/forward_list.h: Likewise.
3905 * include/bits/hashtable.h: Likewise.
3906 * include/bits/regex.h: Likewise.
3907 * include/bits/stl_deque.h: Likewise.
3908 * include/bits/stl_list.h: Likewise.
3909 * include/bits/stl_map.h: Likewise.
3910 * include/bits/stl_multimap.h: Likewise.
3911 * include/bits/stl_multiset.h: Likewise.
3912 * include/bits/stl_queue.h: Likewise.
3913 * include/bits/stl_set.h: Likewise.
3914 * include/bits/stl_stack.h: Likewise.
3915 * include/bits/stl_tree.h: Likewise.
3916 * include/bits/stl_vector.h: Likewise.
3917 * include/bits/unordered_map.h: Likewise.
3918 * include/bits/unordered_set.h: Likewise.
3919 * include/debug/array: Likewise.
3920 * include/experimental/any: Likewise.
3921 * include/experimental/bits/fs_path.h: Likewise.
3922 * include/experimental/internet: Likewise.
3923 * include/experimental/string_view: Likewise.
3924 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3926 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3928 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3930 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3932 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3934 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3936 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3938 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3940 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3941 info_fn_imps.hpp: Likewise.
3942 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3943 left_child_next_sibling_heap_.hpp: Likewise.
3944 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3946 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3948 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3950 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3952 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3954 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3956 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3958 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3959 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3960 * include/ext/rope: Likewise.
3961 * include/ext/slist: Likewise.
3962 * include/ext/vstring.h: Likewise.
3963 * include/profile/array: Likewise.
3964 * include/std/array: Likewise.
3965 * include/tr1/array: Likewise.
3966 * include/tr1/hashtable.h: Likewise.
3967 * include/tr1/regex: Likewise.
3968 * include/tr2/dynamic_bitset: Likewise.
3969 * include/bits/alloc_traits.h: Add nodiscard attribute to
3971 * include/experimental/memory_resource: Likewise.
3972 * include/ext/alloc_traits.h: Likewise.
3973 * include/ext/array_allocator.h: Likewise.
3974 * include/ext/bitmap_allocator.h: Likewise.
3975 * include/ext/debug_allocator.h: Likewise.
3976 * include/ext/extptr_allocator.h: Likewise.
3977 * include/ext/mt_allocator.h: Likewise.
3978 * include/ext/new_allocator.h: Likewise.
3979 * include/ext/pool_allocator.h: Likewise.
3980 * include/ext/throw_allocator.h: Likewise.
3981 * include/std/scoped_allocator: Likewise.
3982 * libsupc++/eh_alloc.cc: Likewise.
3983 * include/std/future: Add nodiscard attribute to async.
3984 * libsupc++/new: Add nodiscard attribute to new.
3986 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3991 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3992 * include/bits/shared_ptr.h
3993 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3994 (allocate_shared): Change to use new tag type.
3995 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3996 Declare new member function.
3997 (_Sp_alloc_shared_tag): Define new type.
3998 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3999 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4000 _Sp_make_shared_tag::_S_eq to check type_info.
4001 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4002 Constrain to prevent being called with _Sp_alloc_shared_tag.
4003 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4004 Replace constructor with ...
4005 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4006 reference parameter so address of the new object can be returned to
4007 the caller. Obtain the allocator from the tag type.
4008 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4009 constructor with ...
4010 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4011 to the __shared_count constructor.
4012 (__allocate_shared): Change to use new tag type.
4013 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4015 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4017 * src/c++17/fs_ops.cc
4018 (equivalent(const path&, const path&, error_code&))
4019 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4020 compare files instead of relying on incomplete info returned by stat.
4023 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4024 if the path is already absolute.
4025 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4026 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4029 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4030 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4031 of filesystem::exists.
4032 (create_directories(const path&, error_code&)): Add assertions.
4033 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4034 Add workaround for bug in _wstat for paths with trailing slash.
4035 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4036 for expected behaviour on mingw.
4037 * testsuite/experimental/filesystem/operations/create_directories.cc:
4039 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4040 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4041 not test permissions on mingw targets.
4043 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4045 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4046 constructors and open members taking wide strings. Fix patterns for
4047 filesystem::path members to match wstring_view parameters. Add
4048 exports for shared_ptr members used by directory iterators.
4049 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4050 error code parameter if the file doesn't exist.
4051 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4053 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4054 values for mingw targets, where "/" is not an absolute path. Do not
4055 test symlinks on mingw targets.
4056 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4057 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4059 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4060 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4061 that each component of the path is created.
4062 * testsuite/experimental/filesystem/operations/create_directories.cc:
4064 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4065 permissions on mingw targets.
4066 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4067 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4068 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4069 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4071 * testsuite/experimental/filesystem/operations/permissions.cc:
4073 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4074 symlinks or permissions on mingw targets.
4075 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4076 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4077 symlinks on mingw targets.
4078 * testsuite/experimental/filesystem/operations/remove_all.cc:
4080 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4081 permissions on mingw targets.
4082 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4083 test symlinks on mingw targets.
4084 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4087 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4090 Warn about unused comparisons of shared_ptr/unique_ptr
4091 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4092 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4093 <, <=, >, >= for shared_ptr.
4094 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4096 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4098 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4099 as 201611L, because P0497R0 changes are supported.
4100 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4102 * include/bits/erase_if.h [__cplusplus > 201703L]
4103 (__cpp_lib_erase_if): Only define for C++2a.
4104 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4105 (__cpp_lib_null_iterators): Define.
4106 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4107 (__cpp_lib_null_iterators): Define.
4108 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4110 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4112 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4114 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4115 changes are supported.
4116 * include/std/optional (__cpp_lib_optional): Likewise.
4117 * include/std/variant (__cpp_lib_variant): Likewise.
4118 * include/std/version [!__STRICT_ANSI__]
4119 (__cpp_lib_uncaught_exceptions): Define as long integer.
4120 [__cplusplus >= 201703L] (__cpp_lib_any)
4121 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4122 (__cpp_lib_variant): Define for C++17.
4123 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4125 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4128 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4130 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4134 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4136 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4139 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4141 * doc/xml/manual/intro.xml: Include new section.
4142 * doc/xml/manual/status_cxx2017.xml: Document more
4143 implementation-defined properties of the library.
4144 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4145 * doc/html/*: Regenerate.
4147 * include/bits/refwrap.h [__cplusplus > 201703L]
4148 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4149 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4150 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4152 (reference_wrapper::operator()): Add static assertion.
4153 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4155 * include/std/chrono (duration_values::zero(), duration_values::min())
4156 (duration_values::max()): Add noexcept.
4157 (duration::zero(), duration::min(), duration::max()): Likewise.
4158 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4159 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4160 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4162 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4164 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4166 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4167 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4169 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4172 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4173 specialization for C++17 (P0513R0, LWG 2817).
4174 * testsuite/20_util/hash/nullptr.cc: New test.
4177 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4178 pattern for std::basic_stringbuf::str().
4180 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4181 basic_ostream::operator<< patterns.
4183 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4185 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4186 test failures on targets with 32-bit time_t.
4188 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4189 * include/std/deque: Likewise.
4190 * include/std/forward_list: Likewise.
4191 * include/std/list: Likewise.
4192 * include/std/string: Likewise.
4193 * include/std/vector: Likewise.
4194 * include/std/version: Likewise.
4195 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4196 * testsuite/23_containers/deque/erasure.cc: Likewise.
4197 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4198 * testsuite/23_containers/list/erasure.cc: Likewise.
4199 * testsuite/23_containers/map/erasure.cc: Likewise.
4200 * testsuite/23_containers/set/erasure.cc: Likewise.
4201 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4202 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4203 * testsuite/23_containers/vector/erasure.cc: Likewise.
4205 * include/experimental/internet [AI_NUMERICSERV]
4206 (resolver_base::numeric_service): Define conditionally.
4207 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4209 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4212 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4213 Jonathan Wakely <jwakely@redhat.com>
4216 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4217 (GLIBCXX_3.4.26): Add new exports.
4218 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4219 correct list of sources.
4220 * include/Makefile.in: Regenerate.
4221 * include/std/ostream (operator<<(nullptr_t)): New member function.
4222 * src/c++17/ostream-inst.cc: New file.
4223 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4226 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4228 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4229 of the source file containing the caller.
4230 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4231 directories created by test.
4232 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4234 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4236 * testsuite/experimental/filesystem/iterators/
4237 recursive_directory_iterator.cc: Likewise.
4239 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4241 PR tree-optimization/88775
4242 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4243 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4244 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4245 instead of __builtin_constant_p if available. Don't bother with
4246 the pointer comparison in C++11 and earlier.
4248 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4252 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4255 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4257 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4258 for filesystem::path. Give variables more distinctive names.
4260 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4261 member function to perform non-trivial assignment.
4262 (_Optional_payload_base::_M_move_assign): Likewise.
4263 (_Optional_payload<T, true, false, true>::operator=)
4264 (_Optional_payload<T, true, true, false>::operator=)
4265 (_Optional_payload<T, true, false, false>::operator=): Call
4266 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4269 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4270 test std::complex<long double> if long double format is IBM128.
4271 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4274 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4276 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4277 for old std::unique_ptr layout.
4278 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4279 to become valueless. Add filesystem::path tests.
4282 * include/std/optional (_Optional_payload_base): New class template
4283 for common code hoisted from _Optional_payload specializations. Use
4284 a template for the union, to allow a partial specialization for
4285 types with non-trivial destructors. Add constructors for in-place
4286 initialization to the union.
4287 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4288 to perform non-trivial copy construction, instead of relying on
4289 non-standard copy elision in a delegating constructor.
4290 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4291 non-trivial move construction.
4292 (_Optional_payload): Derive from _Optional_payload_base and use it
4293 for everything except the non-trivial assignment operators, which are
4295 (_Optional_payload<false, C, M>): Derive from the specialization
4296 _Optional_payload<true, false, false> and add a destructor.
4297 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4298 Forward to corresponding members of _Optional_payload.
4299 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4300 Hoist common members from _Optional_base.
4301 (_Optional_base): Make all members and base class public.
4302 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4303 _Optional_base_impl.
4304 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4305 support for new std::optional layout.
4306 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4309 * include/bits/locale_conv.h: Use <> for includes not "".
4310 * include/ext/random: Likewise.
4311 * include/ext/vstring.h: Likewise.
4313 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4315 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4316 (GLIBCXX_3.4.21): Likewise.
4318 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4321 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4322 to match the one that controls whether utimbuf and utime are declared.
4324 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4327 * include/bits/char_traits.h (char_traits::move): Do not pass null
4328 pointers to memmove.
4329 * include/bits/locale_facets.h
4330 (ctype<char>::widen(const char*, const char*, char*)): Do not
4331 pass null pointers to memcpy.
4332 (ctype<char>::narrow(const char*, const char*, char, char*)):
4334 (ctype<char>::do_widen(const char*, const char*, char*)):
4336 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4339 * doc/xml/manual/spine.xml: Update copyright years.
4340 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4341 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4342 for C++17 filesystem library.
4343 * doc/html/*: Regenerate.
4345 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4346 * config.h.in: Regenerate.
4347 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4348 alphabetically and add missing entries for copy_symlink,
4349 hard_link_count, rename, and resize_file.
4350 * configure: Regenerate.
4351 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4352 used unconditionally.
4353 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4354 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4355 supports truncating to zero length.
4356 * testsuite/27_io/filesystem/operations/all.cc: New test.
4357 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4359 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4362 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4363 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4364 * config.h.in: Regenerate.
4365 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4366 remaining std::filesystem types and functions.
4367 * configure: Regenerate.
4368 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4369 * src/c++17/Makefile.in: Regenerate.
4370 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4371 here, and change name of included file.
4372 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4373 here, and change name of included file.
4374 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4375 path to dir-common.h.
4376 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4377 path to ops-common.h. Disable -Wunused-parameter warnings.
4378 (internal_file_clock): Define unconditionally.
4379 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4381 (do_copy_file, do_space): Move definitions to ops.common.h.
4382 (copy, file_size, hard_link_count, last_write_time, space): Only
4383 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4385 (last_write_time, read_symlink): Remove unused attributes from
4387 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4388 * src/filesystem/Makefile.in: Regenerate.
4389 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4390 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4391 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4392 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4393 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4394 dummy types and functions instead of using #error.
4395 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4396 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4398 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4399 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4400 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4401 to account for new namespace.
4402 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4403 -lstdc++fs from dg-options.
4404 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4405 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4406 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4407 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4408 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4410 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4411 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4413 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4414 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4415 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4416 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4417 * testsuite/27_io/filesystem/operations/create_directories.cc:
4419 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4420 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4421 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4422 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4423 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4424 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4425 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4426 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4427 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4428 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4429 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4430 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4431 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4432 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4433 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4434 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4435 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4436 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4438 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4442 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4443 typeinfo and vtables less greedy.
4444 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4445 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4446 * src/c++17/Makefile.in: Regenerate.
4447 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4448 here, and change name of included file.
4449 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4450 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4452 * src/filesystem/Makefile.in: Regenerate.
4453 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4454 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4455 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4456 from dg-options and remove dg-require-filesystem-ts.
4457 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4458 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4459 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4460 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4461 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4462 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4463 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4464 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4465 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4466 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4467 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4468 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4469 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4470 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4471 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4472 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4473 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4474 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4475 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4476 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4477 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4479 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4480 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4481 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4482 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4483 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4484 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4485 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4486 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4487 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4488 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4489 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4490 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4492 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4494 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4496 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4498 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4499 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4500 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4501 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4502 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4503 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4504 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4505 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4506 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4507 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4509 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4510 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4511 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4512 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4513 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4516 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4517 Check is_trivially_copyable instead of is_scalar.
4518 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4519 contained value can throw and its type is trivially copyable then
4520 construct into a temporary variant and move from it, to provide the
4521 strong exception safety guarantee.
4522 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4524 * testsuite/20_util/variant/87431.cc: New test.
4525 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4526 conversion causes valueless state.
4529 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4530 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4531 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4532 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4533 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4535 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4537 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4538 (file_time_type): Redefine in terms of __file_clock.
4539 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4541 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4543 (internal_file_lock): New helper type for accessing __file_clock.
4544 (do_copy_file): Use internal_file_lock to convert system time to
4546 (last_write_time(const path&, error_code&)): Likewise.
4547 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4549 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4551 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4552 for const member functions of std::basic_string.
4553 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4555 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4556 Make non-standard constructor private.
4557 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4559 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4560 explicit instantiations for C++17 as well as earlier dialects.
4561 * src/c++17/Makefile.am: Add new source files.
4562 * src/c++17/Makefile.in: Regenerate.
4563 * src/c++17/cow-string-inst.cc: New file defining explicit
4564 instantiations for basic_string member functions added in C++17.
4565 * src/c++17/string-inst.cc: Likewise.
4567 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4568 copy/move constructors for old std::basic_string.
4569 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4570 (basic_string::reference, basic_string::const_reference): Define
4571 as plain references for C++11 and later.
4572 (basic_string::basic_string()): Put constructor body outside
4573 preprocessor conditional groups.
4574 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4575 instead of copying it.
4576 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4578 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4580 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4581 cases for old basic_string.
4582 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4583 allocator-extended constructors unconditionally. Add extra members to
4584 allocator type when using old string ABI.
4585 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4587 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4589 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4590 -fno-inline added to test flags.
4592 * testsuite/21_strings/basic_string/requirements/
4593 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4595 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4596 assertion failures with old std::string ABI.
4598 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4600 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4601 functions that will only erase elements at the end.
4602 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4603 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4604 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4606 (path::_List::pop_back()): Define.
4607 (path::_List::_M_erase_from(const_iterator)): Define.
4608 (path::operator/=(const path&)): Use pop_back to remove last component
4609 and _M_erase_from to remove multiple components.
4610 (path::_M_append(basic_string_view<value_type>)): Likewise.
4611 (path::operator+=(const path&)): Likewise.
4612 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4613 (path::remove_filename()): Likewise.
4614 (path::lexically_normal()): Use _List::_Impl iterators instead of
4615 path::iterator. Use pop_back to remove components from the end. Clear
4616 trailing filename, instead of using erase(const_iterator) to remove
4617 a non-final component.
4618 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4620 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4622 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4623 incorrect treatment of empty filename after trailing slash.
4624 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4626 * testsuite/21_strings/basic_string/modifiers/assign/char/
4627 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4629 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4630 move_assign_optim.cc: Likewise.
4632 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4633 Jakub Jelinek <jakub@redhat.com>
4636 * include/experimental/memory: Replace UTF-8 quote characters.
4637 * include/std/future: Replace UTF-8 "em dash" characters.
4639 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4642 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4643 * include/debug/forward_list: Likewise.
4644 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4646 * include/experimental/chrono: Likewise.
4647 * include/experimental/functional: Likewise.
4648 * include/experimental/ratio: Likewise.
4649 * include/experimental/system_error: Likewise.
4650 * include/experimental/tuple: Likewise.
4651 * include/experimental/type_traits: Likewise.
4652 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4653 * include/parallel/multiseq_selection.h: Likewise.
4656 * config/abi/pre/gnu.ver: Add missing exports.
4657 * testsuite/22_locale/collate_byname/88681.cc: New test.
4658 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4659 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4661 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4663 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4664 initializer_list<value_type> and from input iterator ranges.
4665 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4667 * testsuite/experimental/string_view/element_access/char/empty.cc:
4668 Fix year range in copyright header.
4670 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4672 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4673 Fix year range in copyright header.
4675 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4677 Update copyright years.
4679 Copyright (C) 2019 Free Software Foundation, Inc.
4681 Copying and distribution of this file, with or without modification,
4682 are permitted in any medium without royalty provided the copyright
4683 notice and this notice are preserved.