1 2019-07-16 Jason Merrill <jason@redhat.com>
3 * include/std/memory (uses_allocator_construction_args): Add parens
6 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
8 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
10 * include/experimental/string_view (__detail::__idt): Remove.
11 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
12 Use __type_identity_t instead of __detail::__idt;
13 * include/std/string_view (__detail::__idt): Remove.
14 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
15 Use __type_identity_t instead of __detail::__idt;
16 * include/std/type_traits (__type_identity_t): New alias template.
18 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
19 and floating point atomics.
21 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
23 * doc/xml/manual/configure.xml: Improve documentation of
24 --enable-libstdcxx-time option.
26 * include/bits/atomic_base.h (__atomic_impl): New namespace for
27 wrappers around atomic built-ins.
28 (__atomic_float, __atomic_ref): New class templates for use as base
30 * include/std/atomic (atomic<float>, atomic<double>)
31 (atomic<long double>): New explicit specializations.
32 (atomic_ref): New class template.
33 (__cpp_lib_atomic_ref): Define.
34 * include/std/version (__cpp_lib_atomic_ref): Define.
35 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
36 * testsuite/29_atomics/atomic_float/1.cc: New test.
37 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
38 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
39 * testsuite/29_atomics/atomic_ref/float.cc: New test.
40 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
41 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
42 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
43 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
45 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
47 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
48 throw() with _GLIBCXX_NOTHROW.
49 (__atomic_add_dispatch): Return after performing atomic increment.
51 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
53 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
54 (__exchange_and_add): Replace static specifier with always_inline
56 (__exchange_and_add_single, __atomic_add_single): Likewise.
57 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
58 combine !__gthread_active_p() and !__GTHREADS branches.
60 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
63 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
64 * configure: Regenerate.
65 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
67 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
68 * testsuite/util/testsuite_abi.cc: Add new symbol version.
70 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
72 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
73 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
74 instead of __is_identifier to detect Clang support.
76 2019-07-02 Jim Wilson <jimw@sifive.com>
78 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
80 * configure: Regenerate.
82 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
85 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
86 for the what_arg parameters.
87 (filesystem_error::filesystem_error): Pass system_error::what() to
88 the _Impl constructor.
89 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
90 filesystem_error::what() contains system_error::what().
92 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
94 * include/std/charconv (chars_format): Define bitmask type.
95 * testsuite/20_util/to_chars/chars_format.cc: New test.
97 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
98 * include/std/bit (_If_is_unsigned_integer_type): Remove.
99 (_If_is_unsigned_integer): Use __is_unsigned_integer.
100 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
101 (countl_one(byte), countr_zero(byte), countr_one(byte))
102 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
103 (log2p1(byte)): Remove.
104 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
105 (__detail::__is_int_to_chars_type): Remove.
106 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
107 and __is_unsigned_integer.
108 * include/std/type_traits (__is_one_of): Move here from <charconv>.
109 (__is_signed_integer, __is_unsigned_integer): New helpers.
110 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
112 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
113 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
114 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
115 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
116 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
117 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
118 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
119 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
120 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
121 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
123 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
125 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
128 2019-06-25 Jakub Jelinek <jakub@redhat.com>
130 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
131 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
132 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
133 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
135 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
137 * include/std/numeric (midpoint(T, T)): Change implementation for
138 floating-point types to avoid incorrect rounding of denormals.
139 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
140 rounding with denormals.
141 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
142 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
144 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
146 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
148 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
150 * configure: Regenerate.
152 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
153 Qualify calls to __never_valueless.
155 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
158 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
159 vector<bool> for test.
160 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
162 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
164 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
166 (istream_iterator::_M_read()): Do not check stream state before
167 attempting extraction. Set stream pointer to null when extraction
169 (operator==(const istream_iterator&, const istream_iterator&)): Change
170 to be a hidden friend of istream_iterator.
171 (operator!=(const istream_iterator&, const istream_iterator&)):
173 (ostream_iterator::ostream_iterator()): Add default constructor.
174 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
176 * testsuite/24_iterators/istream_iterator/1.cc: New test.
177 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
178 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
179 constructor taking a string.
180 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
183 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
184 Jonathan Wakely <jwakely@redhat.com>
187 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
188 values of type bool for vector<bool> elements.
189 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
190 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
192 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
194 PR libstdc++/90920 partially revert r263433
195 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
196 (rotate): Remove checks.
197 * testsuite/25_algorithms/rotate/90920.cc: New test.
199 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
200 category used in invocable check.
201 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
202 * testsuite/26_numerics/reduce/2.cc: New test.
204 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
206 * include/bits/algorithmfwd.h: Change title of doc group.
207 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
209 * include/bits/stl_numeric.h: Define doc group and add algos to it.
210 * include/std/numeric (__is_random_access_iter): New internal trait.
211 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
212 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
213 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
214 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
215 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
216 * testsuite/26_numerics/reduce/1.cc: New test.
217 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
218 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
219 * testsuite/26_numerics/transform_reduce/1.cc: New test.
220 * testsuite/util/testsuite_iterators.h (test_container::size()): New
223 * include/c_global/cstddef (std::byte): Perform arithmetic operations
224 in unsigned int to avoid promotion (LWG 2950).
226 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
228 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
231 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
233 PR libstdc++/90281 Fix string conversions for filesystem::path
234 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
235 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
236 __str_codecvt_in_all to fail for partial conversions and throw on
238 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
239 (path::_Cvt<char8_t>): Add explicit specialization.
240 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
242 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
243 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
244 instead of codecvt_utf8. Use __str_codecvt_in_all and
245 __str_codecvt_out_all.
246 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
247 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
248 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
249 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
250 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
251 after converting to UTF-8.
252 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
253 __str_codecvt_in_all.
254 (path::string): Fix initialization of string types with different
256 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
257 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
258 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
260 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
261 return false for partial conversions.
262 * include/experimental/bits/fs_path.h (u8path):
263 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
264 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
265 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
266 instead of codecvt_utf8. Use __str_codecvt_in_all and
267 __str_codecvt_out_all.
268 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
269 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
270 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
271 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
272 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
273 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
274 __str_codecvt_in_all.
275 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
276 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
277 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
278 __str_codecvt_in_all.
279 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
280 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
281 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
282 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
283 strings and with Unicode characters outside the basic multilingual
285 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
286 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
287 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
288 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
289 * testsuite/experimental/filesystem/path/native/string.cc: Test with
290 empty strings and with Unicode characters outside the basic
293 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
294 Jonathan Wakely <jwakely@redhat.com>
296 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
297 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
298 deallocate node if insertion fails.
299 (_Hashtable::_M_insert_multi_node): Likewise.
300 (_Hashtable::_M_reinsert_node): Pass additional key argument.
301 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
302 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
303 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
304 (_Hashtable::extract(const _Key&)): Likewise.
305 (_Hashtable::_M_merge_unique): Pass additional key argument.
306 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
308 (_Hashtable::_M_insert): Likewise.
309 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
310 (_Hashtable_alloc): Add comments to functions with misleading names.
312 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
314 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
316 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
317 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
318 header for std::allocator.
319 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
320 using-declaration for std::size_t.
321 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
323 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
325 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
326 * testsuite/experimental/map/erasure.cc: Include <string> for
328 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
330 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
332 * include/experimental/type_traits (experimental::nonesuch): Use
333 pragma to disable -Wctor-dtor-privacy warnings.
334 * include/std/type_traits (__is_convertible_helper<From, To, false>)
335 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
337 * include/std/version (__cpp_lib_bind_front): Add missing macro.
339 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
341 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
342 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
343 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
344 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
346 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
347 (variant::emplace): Change static_assert messages from "should be"
349 (hash<monostate>::operator()): Remove name of unused parameter.
351 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
354 * include/Makefile.am: Add new <bits/charconv.h> header.
355 * include/Makefile.in: Regenerate.
356 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
357 (to_string(long), to_string(unsigned long), to_string(long long))
358 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
359 * include/bits/charconv.h: New header.
360 (__detail::__to_chars_len): Move here from <charconv>.
361 (__detail::__to_chars_10_impl): New function extracted from
362 __detail::__to_chars_10.
363 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
364 (__to_chars_unsigned_type): New class template that reuses
365 __make_unsigned_selector_base::__select to pick a type.
366 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
367 (__detail::__to_chars_len): Move to new header.
368 (__detail::__to_chars_10): Add inline specifier. Move code doing the
369 output to __detail::__to_chars_10_impl and call that.
370 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
371 * testsuite/21_strings/basic_string/numeric_conversions/char/
372 to_string.cc: Fix reference in comment. Remove unused variable.
373 * testsuite/21_strings/basic_string/numeric_conversions/char/
374 to_string_int.cc: New test.
376 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
378 Fix ConstexprIterator requirements tests - No constexpr algorithms!
379 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
380 Replace copy with hand-rolled loop.
381 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
384 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
386 Test for C++20 p0858 - ConstexprIterator requirements.
387 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
389 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
392 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
394 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
396 * include/bits/c++config: Rename all macros of the form __PSTL* to
398 * include/std/algorithm: Likewise.
399 * include/std/execution: Likewise.
400 * include/std/numeric: Likewise.
401 * include/std/memory: Likewise.
402 * include/pstl/glue_memory_impl.h: Likewise.
403 * include/pstl/numeric_impl.h: Likewise.
404 * include/pstl/glue_memory_defs.h: Likewise.
405 * include/pstl/execution_defs.h: Likewise.
406 * include/pstl/utils.h: Likewise.
407 * include/pstl/algorithm_fwd.h: Likewise.
408 * include/pstl/unseq_backend_simd.h: Likewise.
409 * include/pstl/glue_execution_defs.h: Likewise.
410 * include/pstl/algorithm_impl.h: Likewise.
411 * include/pstl/parallel_impl.h: Likewise.
412 * include/pstl/memory_impl.h: Likewise.
413 * include/pstl/glue_numeric_defs.h: Likewise.
414 * include/pstl/parallel_backend_utils.h: Likewise.
415 * include/pstl/glue_algorithm_defs.h: Likewise.
416 * include/pstl/parallel_backend.h: Likewise.
417 * include/pstl/glue_numeric_impl.h: Likewise.
418 * include/pstl/parallel_backend_tbb.h: Likewise.
419 * include/pstl/numeric_fwd.h: Likewise.
420 * include/pstl/glue_algorithm_impl.h: Likewise.
421 * include/pstl/execution_impl.h: Likewise.
422 * include/pstl/pstl_config.h: Likewise.
423 * testsuite/util/pstl/pstl_test_config.h: Likewise.
424 * testsuite/util/pstl/test_utils.h: Likewise.
425 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
427 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
429 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
431 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
432 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
433 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
434 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
435 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
437 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
438 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
439 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
440 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
441 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
443 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
444 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
445 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
446 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
447 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
449 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
450 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
451 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
453 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
455 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
456 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
457 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
459 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
461 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
463 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
465 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
467 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
469 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
471 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
473 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
475 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
477 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
479 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
481 Rename header guards to be consistent with upstream project's
483 * include/pstl/glue_memory_impl.h: Rename all macros of the form
484 _PSTL_(.*)_H to _PSTL_\U\1_H.
485 * include/pstl/numeric_impl.h: Likewise.
486 * include/pstl/glue_memory_defs.h: Likewise.
487 * include/pstl/execution_defs.h: Likewise.
488 * include/pstl/utils.h: Likewise.
489 * include/pstl/algorithm_fwd.h: Likewise.
490 * include/pstl/unseq_backend_simd.h: Likewise.
491 * include/pstl/glue_execution_defs.h: Likewise.
492 * include/pstl/algorithm_impl.h: Likewise.
493 * include/pstl/parallel_impl.h: Likewise.
494 * include/pstl/memory_impl.h: Likewise.
495 * include/pstl/glue_numeric_defs.h: Likewise.
496 * include/pstl/parallel_backend_utils.h: Likewise.
497 * include/pstl/glue_algorithm_defs.h: Likewise.
498 * include/pstl/parallel_backend.h: Likewise.
499 * include/pstl/glue_numeric_impl.h: Likewise.
500 * include/pstl/parallel_backend_tbb.h: Likewise.
501 * include/pstl/numeric_fwd.h: Likewise.
502 * include/pstl/glue_algorithm_impl.h: Likewise.
503 * include/pstl/execution_impl.h: Likewise.
504 * include/pstl/pstl_config.h: Likewise.
505 * testsuite/util/pstl/pstl_test_config.h: Likewise.
507 Synchronize libstdc++ parallel algorithms with upstream
509 * include/pstl/algorithm_fwd.h: Synchronize with
510 upstream PSTL project.
511 * include/pstl/algorithm_impl.h: Likewise.
512 * include/pstl/execution_defs.h: Likewise.
513 * include/pstl/execution_impl.h: Likewise.
514 * include/pstl/glue_algorithm_impl.h: Likewise.
515 * include/pstl/glue_execution_defs.h: Likewise.
516 * include/pstl/numeric_fwd.h: Likewise.
517 * include/pstl/numeric_impl.h: Likewise.
518 * include/pstl/parallel_backend.h: Likewise.
519 * include/pstl/pstl_config.h: Likewise.
520 * include/pstl/unseq_backend_simd.h: Likewise.
521 * include/pstl/parallel_backend_serial.h: New file.
522 * include/Makefile.am (pstl_headers): Add
523 parallel_backend_serial.h.
524 * include/Makefile.in: Regenerate.
526 Clean up non-conforming names
527 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
528 Uglfiy copy_range1 and copy_range2
529 (__pattern_walk2_n): Rename local n to __n
530 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
531 Rename parameter _T to _Tp.
533 Integrate non-TBB serial backend support
534 * include/bits/c++config: Adjust TBB detection logic to select serial
535 PSTL backend if no TBB present.
536 * testsuite/utils/pstl/test_utils.h: Remove check for
537 _PSTL_USE_PAR_POLICIES
539 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
541 * testsuite/24_iterators/container_access.cc: Move dg-options before
542 dg-do directive so the target check uses the -std option.
545 * configure: Regenerate.
546 * src/Makefile.am (stamp-debug): Also test for missing makefile.
547 * src/Makefile.in: Regenerate.
549 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
551 * include/std/array: Do not include <stdexcept>.
552 * include/std/optional: Include <exception> and
553 <bits/exception_defines.h> instead of <stdexcept>.
554 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
556 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
558 * testsuite/23_containers/map/erasure.cc: Include <string>.
559 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
561 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
562 dg-prune-output for different C++98 diagnostic.
563 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
565 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
567 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
569 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
571 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
573 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
575 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
577 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
579 * testsuite/23_containers/vector/requirements/dr438/
580 constructor_1_neg.cc: Likewise.
581 * testsuite/23_containers/vector/requirements/dr438/
582 constructor_2_neg.cc: Likewise.
583 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
585 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
587 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
588 Do not test allocator rebinding extension for C++2a.
589 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
590 dg-do directive for C++17 and C++2a.
592 * testsuite/23_containers/deque/requirements/explicit_instantiation/
593 1_c++0x.cc: Remove redundant test.
594 * testsuite/23_containers/deque/requirements/explicit_instantiation/
595 2.cc: Use target selector instead of preprocessor condition.
596 * testsuite/23_containers/deque/requirements/explicit_instantiation/
597 3.cc: Do not run test for C++2a.
598 * testsuite/23_containers/forward_list/requirements/
599 explicit_instantiation/3.cc: Likewise.
600 * testsuite/23_containers/forward_list/requirements/
601 explicit_instantiation/5.cc: Do not test allocator rebinding extension
603 * testsuite/23_containers/list/requirements/explicit_instantiation/
604 1_c++0x.cc: Remove redundant test.
605 * testsuite/23_containers/list/requirements/explicit_instantiation/
606 2.cc: Use target selector instead of preprocessor condition.
607 * testsuite/23_containers/list/requirements/explicit_instantiation/
608 3.cc: Do not run test for C++2a.
609 * testsuite/23_containers/list/requirements/explicit_instantiation/
610 5.cc: Do not test allocator rebinding extension for C++2a.
611 * testsuite/23_containers/map/requirements/explicit_instantiation/
612 1_c++0x.cc: Remove redundant test.
613 * testsuite/23_containers/map/requirements/explicit_instantiation/
614 2.cc: Adjust comment.
615 * testsuite/23_containers/map/requirements/explicit_instantiation/
616 3.cc: Do not run test for C++2a.
617 * testsuite/23_containers/map/requirements/explicit_instantiation/
618 5.cc: Do not test allocator rebinding extension for C++2a.
619 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
620 1_c++0x.cc: Remove redundant test.
621 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
622 3.cc: Do not run test for C++2a.
623 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
624 5.cc: Do not test allocator rebinding extension for C++2a.
625 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
626 3.cc: Do not run test for C++2a.
627 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
628 5.cc: Do not test allocator rebinding extension for C++2a.
629 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
630 Do not run test for C++2a.
631 * testsuite/23_containers/set/requirements/explicit_instantiation/
632 1_c++0x.cc: Remove redundant test.
633 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
634 Do not test allocator rebinding extension for C++2a.
635 * testsuite/23_containers/unordered_map/requirements/
636 explicit_instantiation/3.cc: Likewise.
637 * testsuite/23_containers/unordered_map/requirements/
638 explicit_instantiation/5.cc: Do not test allocator rebinding extension
640 * testsuite/23_containers/unordered_multimap/requirements/
641 explicit_instantiation/3.cc: Do not run test for C++2a.
642 * testsuite/23_containers/unordered_multimap/requirements/
643 explicit_instantiation/5.cc: Do not test allocator rebinding extension
645 * testsuite/23_containers/unordered_multiset/requirements/
646 explicit_instantiation/3.cc: Do not run test for C++2a.
647 * testsuite/23_containers/unordered_multiset/requirements/
648 explicit_instantiation/5.cc: Do not test allocator rebinding extension
650 * testsuite/23_containers/unordered_set/requirements/
651 explicit_instantiation/3.cc: Do not run test for C++2a.
652 * testsuite/23_containers/unordered_set/requirements/
653 explicit_instantiation/5.cc: Do not test allocator rebinding extension
655 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
656 2.cc: Remove redundant test.
657 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
658 3.cc: Do not run test for C++2a.
659 * testsuite/23_containers/vector/requirements/explicit_instantiation/
662 * include/std/type_traits (is_empty, is_polymorphic, is_final)
663 (is_abstract, is_aggregate): Remove static_assert.
664 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
666 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
667 missing -std=gnu++17 option.
668 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
669 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
670 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
673 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
674 * testsuite/18_support/set_unexpected.cc: Likewise.
675 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
677 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
678 function to be valid in C++11.
679 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
680 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
681 include Library Fundamentals or Networking headers in C++11 mode.
682 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
684 * include/std/tuple (_TC): Replace with _TupleConstraints.
685 (_TupleConstraints): New helper for SFINAE constraints, with more
686 expressive member functions to reduce duplication when used.
687 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
688 (tuple::_TCC): Replace dummy type parameter with bool non-type
689 parameter that can be used to check the pack size.
690 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
691 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
692 checking constraints in constructors.
693 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
695 (tuple::tuple): Use new helpers to reduce repitition in constraints.
696 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
697 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
698 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
699 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
700 constraints in constructors.
701 (tuple::__is_alloc_arg()): New SFINAE helpers.
702 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
704 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
705 * testsuite/20_util/tuple/cons/90700.cc: New test.
706 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
707 to meet new constraint on allocator-extended default constructor.
709 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
711 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
712 * include/bits/stl_multimap.h (multimap): Likewise.
714 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
716 Rename variables and cleanup comments.
717 * include/bits/hashtable_policy.h
718 * include/bits/hashtable.h
720 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
722 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
723 Fix bgcolor for P0340R3.
724 * doc/html/*: Regenerate.
727 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
728 <experimental/memory_resource>.
729 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
730 P0339R6, P0340R3, P1164R1 and P1357R1.
731 * doc/html/*: Regenerate.
733 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
734 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
735 allocator::value_type assertion for C++2a.
736 * include/bits/hashtable.h: Likewise.
737 * include/bits/stl_deque.h: Likewise.
738 * include/bits/stl_list.h: Likewise.
739 * include/bits/stl_map.h: Likewise.
740 * include/bits/stl_multimap.h: Likewise.
741 * include/bits/stl_multiset.h: Likewise.
742 * include/bits/stl_set.h: Likewise.
743 * include/bits/stl_vector.h: Likewise.
744 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
745 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
746 * testsuite/23_containers/list/48101-3_neg.cc: New test.
747 * testsuite/23_containers/map/48101-3_neg.cc: New test.
748 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
749 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
750 * testsuite/23_containers/set/48101-3_neg.cc: New test.
751 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
752 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
753 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
754 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
755 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
757 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
759 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
761 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
763 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
765 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
767 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
769 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
771 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
774 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
775 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
776 * libsupc++/eh_term_handler.h: New header defining
777 _GLIBCXX_DEFAULT_TERM_HANDLER.
778 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
779 (set_terminate): Restore default handler when argument is null.
780 (set_unexpected): Likewise.
781 * testsuite/18_support/set_terminate.cc: New test.
782 * testsuite/18_support/set_unexpected.cc: New test.
784 * include/backward/hashtable.h (size_t, ptrdiff_t)
785 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
786 (distance, vector, pair, __iterator_category): Remove
787 using-declarations that add these names to namespace __gnu_cxx.
788 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
789 * include/ext/debug_allocator.h (size_t): Likewise.
790 * include/ext/functional (size_t, unary_function, binary_function)
791 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
793 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
794 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
795 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
796 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
797 * include/ext/numeric (iota): Fix outdated comment.
798 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
799 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
800 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
801 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
802 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
804 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
805 (allocator, __true_type, __false_type): Likewise.
807 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
810 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
811 New helpers for checking preconditions in traits.
812 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
813 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
814 (is_destructible, is_nothrow_destructible, is_constructible)
815 (is_default_constructible, is_copy_constructible)
816 (is_move_constructible, is_nothrow_default_constructible)
817 (is_nothrow_constructible, is_nothrow_copy_constructible)
818 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
819 (is_nothrow_assignable, is_nothrow_copy_assignable)
820 (is_nothrow_move_assignable, is_trivially_constructible)
821 (is_trivially_copy_constructible, is_trivially_move_constructible)
822 is_trivially_assignable, is_trivially_copy_assignable)
823 (is_trivially_move_assignable, is_trivially_destructible)
824 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
825 (is_invocable_r, is_nothrow_invocable)
826 (has_unique_object_representations, is_aggregate): Add static_asserts
827 to make sure that type traits are not misused with incomplete types.
828 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
829 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
830 base characteristics without assertions that can be reused in other
832 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
833 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
835 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
836 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
837 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
838 * testsuite/20_util/is_class/value.cc: Check incomplete type.
839 * testsuite/20_util/is_function/value.cc: Likewise.
840 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
841 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
843 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
844 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
845 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
846 * testsuite/20_util/is_union/value.cc: Likewise.
847 * testsuite/20_util/is_void/value.cc: Likewise.
848 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
850 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
852 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
853 Add new private member function.
854 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
855 (random_device::_M_init_pretr1(const string&)): Call new private
856 member with string data.
857 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
859 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
860 test using COW strings.
861 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
862 a value from the device.
863 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
864 Fix typo in token string.
866 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
868 LWG2788 basic_string spurious use of a default constructible allocator
869 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
870 (basic_string::_M_replace_dispatch): Construct temporary string with
871 the current allocator.
872 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
873 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
875 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
877 * doc/xml/manual/diagnostics.xml: Update list of headers that define
879 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
880 section about new/delete overloads. Improve section on verbose
882 * doc/html/*: Regenerate.
884 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
885 P0811R3. Change status of P1353R0.
886 * doc/html/*: Regenerate.
888 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
889 documentation of implementation-defined types for [thread.req.native].
890 * doc/xml/manual/status_cxx2017.xml: Update documentation of
891 implementation-defined strings for [variant.bad.access]. Fix typo in
892 documentation of implementation-defined support for [fs.conform.9945].
893 * doc/html/*: Regenerate.
895 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
898 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
899 that fails on mingw-w64.
902 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
903 (status(const path&, error_code&)): Use parent_path() to remove
905 (symlink_status(const path&, error_code&)): Duplicate workaround for
906 bug in _wstat for paths with trailing slash.
907 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
909 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
910 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
912 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
913 once instead of building it iteratively.
915 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
917 PR libstdc++/85494 use rdseed and rand_s in std::random_device
918 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
919 the assembler supports rdseed.
920 * config.h.in: Regenerate.
921 * configure: Regenerate.
922 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
923 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
924 * doc/html/*: Regenerate.
925 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
926 * include/bits/random.h (random_device::random_device()): Always call
927 _M_init rather than _M_init_pretr1.
928 (random_device::random_device(const string&)): Likewise.
929 (random_device::operator()()): Always call _M_getval().
930 (random_device::_M_file): Replace first member of union with an
931 anonymous struct, with _M_file as its first member.
932 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
933 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
934 (USE_MT19937): Define if none of the above are defined.
935 (USE_POSIX_FILE_IO): Define.
936 (_M_strtoul): Remove.
937 [USE_RDSEED] (__x86_rdseed): Define new function.
938 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
939 (random_device::_M_init(const string&)): Initialize new union members.
940 Add support for "rdseed" and "rand_s" tokens. Decide what the
941 "default" token does according to which USE_* macros are defined.
942 [USE_POSIX_FILE_IO]: Store a file descriptor.
943 [USE_MT19937]: Forward to _M_init_pretr1 instead.
944 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
945 code from _M_strtoul.
946 [!USE_MT19937]: Call _M_init, transforming the old default token or
947 numeric tokens to "default".
948 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
949 (random_device::_M_getval()): Use new union members to obtain a
950 random number from the stored function pointer or file descriptor.
951 [USE_MT19937]: Obtain a value from the mt19937 engine.
952 (random_device::_M_getval_pretr1()): Call _M_getval().
953 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
955 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
956 * testsuite/26_numerics/random/random_device/85494.cc: New test.
958 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
961 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
962 _M_split_cmpts() for a path with multiple components.
963 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
964 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
965 components and reserve space in vector. Return early when there is
967 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
968 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
970 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
971 form of std::equals for C++11 compatibility.
973 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
975 * doc/xml/manual/appendix_contributing.xml: Update pointer to
976 C++ standard at ansi.org.
978 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
980 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
981 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
984 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
985 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
987 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
989 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
991 * testsuite/20_util/function_objects/invoke/3.cc: New test.
992 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
993 "compile" test to "run".
995 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
996 * doc/html/*: Regenerate.
997 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
998 rvalue aliasing constructor.
999 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1000 (reinterpret_pointer_cast): Add overloads taking rvalues.
1001 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1002 Add rvalue aliasing constructor.
1003 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1004 "run" and check return values as well as types.
1005 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1006 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1007 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1008 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1011 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1012 * doc/xml/manual/intro.xml: Likewise.
1013 * include/std/future (__create_task_state): Add default arguments
1014 to make providing an allocator optional.
1015 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1016 instead of delegating to another constructor.
1017 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1018 define allocator-extended constructors for C++17 and later.
1019 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1021 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1022 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1023 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1025 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1027 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1028 Don't run the libstdc++/83237 part on simulator targets.
1030 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1032 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1034 * doc/html/*: Regenerate.
1036 * include/experimental/any (__any_caster): Use RTTI if comparing
1037 addresses fails, to support non-unique addresses in shared libraries.
1038 * include/std/any (__any_caster): Likewise.
1041 * include/experimental/any (__any_caster): Constrain to only be
1042 callable for object types. Use remove_cv_t instead of decay_t.
1043 If the type decays or isn't copy constructible, compare the manager
1044 function to a dummy specialization.
1045 (__any_caster): Add overload constrained for non-object types.
1046 (any::_Manager_internal<_Op>): Add dummy specialization.
1047 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1050 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1053 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1054 reversed arguments to uninitialized_copy_n.
1055 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1056 is unchanged by copy assignment.
1057 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1058 compare path components.
1061 * include/experimental/memory_resource: Add system header pragma and
1062 do not define anything unless compiled as C++14 or later.
1063 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1064 (__resource_adaptor_imp::do_allocate): If the requested alignment
1065 is a fundamental alignment then either allocate directly from _M_alloc
1066 or call the new _M_allocate function.
1067 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1068 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1069 of the allocator rebound to a POD type with the specified alignment.
1070 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1071 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1072 Adjust expected allocation sizes.
1073 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1074 xfail for Solaris x86.
1076 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1078 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1079 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1080 Use std::__remove_cvref_t when building with GCC.
1082 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1085 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1086 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1087 Use check_v3_target_prop_cached to cache the result of the test.
1089 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1091 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1094 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1095 Changed v3_target_compile check from preprocess to executable.
1096 Added "-ltbb" to v3_target_compile flags.
1098 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1100 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1101 Add check for Thread Building Blocks 2018 or later.
1103 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1105 * testsuite/experimental/names.cc: Only include Networking TS headers
1106 on targets with the necessary Gthreads support.
1108 2019-05-20 Marek Polacek <polacek@redhat.com>
1110 CWG 2094 - volatile scalars are trivially copyable.
1112 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1113 result for volatile int.
1115 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1117 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1118 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1121 PR c++/90532 Ensure __is_constructible(T[]) is false
1122 * include/std/type_traits (__do_is_default_constructible_impl)
1123 (__is_default_constructible_atom, __is_default_constructible_safe):
1125 (is_default_constructible): Use is_constructible.
1126 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1127 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1128 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1129 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1132 2019-05-20 Pádraig Brady <pbrady@fb.com>
1134 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1135 to the deallocator with -fsized-deallocation.
1137 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1139 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1140 test by passing correct alignment to deallocate function.
1142 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1145 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1146 Raise exception if unique_ptr tuple member has unknown structure.
1147 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1148 Adjust worker to support new __uniq_ptr_data base class. Do not
1149 assume field called _M_head_impl is the first tuple element.
1151 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1153 * include/bits/stl_deque.h
1154 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1155 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1156 (_Deque_base::_Deque_impl_data): New.
1157 (_Deque_base::_Deque_impl): Inherit latter.
1158 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1159 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1160 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1161 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1162 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1163 (deque<>::deque()): Default.
1164 (deque<>::deque(deque&&)): Default.
1165 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1166 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1167 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1168 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1169 _M_range_initialize.
1170 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1171 (deque<>::resize(size_type, const value_type&)): Share a single
1173 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1174 _M_range_insert_aux.
1175 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1176 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1177 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1178 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1180 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1183 * include/std/variant (holds_alternative, get, get_if): Improve
1184 static assertion messages.
1185 (bad_variant_access::bad_variant_access()): Change default message.
1186 (__throw_bad_variant_access(bool)): New overload.
1187 (get): Use new overload.
1188 (visit, visit<R>): Improve exception message.
1190 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1191 targets. Add more cases from P0608R3.
1192 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1194 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1195 * include/experimental/type_traits (is_detected_exact)
1196 (is_detected_exact_v): Likewise.
1197 * include/pstl/execution_defs.h (is_execution_policy)
1198 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1199 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1200 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1201 * testsuite/experimental/names.cc: New test.
1204 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1205 assertions from the destructor.
1206 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1207 Move static_assert for hash function to here.
1208 (_Hash_table_base::_M_equals): Move static_assert for equality
1210 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1212 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1213 the value directly instead of calling _S_value.
1214 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1215 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1216 _S_key(_Const_Link_type).
1217 * testsuite/23_containers/set/85965.cc: Check construction,
1218 destruction, assignment and size() do not trigger the assertions.
1219 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1220 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1222 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1223 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1224 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1225 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1226 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1227 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1228 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1230 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1231 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1234 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1236 * doc/html/*: Regenerate.
1237 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1238 of decay_t (P0777R1).
1240 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1242 Move from state of allocators (LWG2593)
1243 * include/bits/stl_deque.h
1244 (_Deque_base(_Deque_base&&, false_type)): Remove.
1245 (_Deque_base(_Deque_base&&, true_type)): Remove.
1246 (_Deque_base(_Deque_base&&)): Adapt.
1247 (_Deque_base::_M_move_impl()): Remove.
1248 * testsuite/util/testsuite_allocator.h
1249 (propagating_allocator(propagating_allocator&&)): Preserve move from
1251 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1253 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1255 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1256 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1257 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1259 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1261 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1262 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1264 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1266 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1268 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1270 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1272 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1274 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1276 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1279 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1281 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1282 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1284 * include/std/variant (__overload_set): Remove.
1286 (_Build_FUN): New class template to define a single FUN overload,
1287 with specializations to prevent unwanted conversions, as per P0608R3.
1288 (_Build_FUNs): New class template to build an overload set of FUN.
1289 (_FUN_type): New alias template to perform overload resolution.
1290 (__accepted_type): Use integer_constant base for failure case. Use
1291 _FUN_type for successful case.
1292 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1293 (variant::variant(_Tp&&)): Likewise.
1294 (variant::operator=(_Tp&&)): Likewise.
1296 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1297 Replace raw visitation with a runtime check for the valueless state
1298 and a non-raw visitor.
1299 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1300 (variant::index()): Remove branch.
1301 (variant::swap(variant&)): Use valueless_by_exception() instead of
1302 comparing the index to variant_npos, and add likelihood attribute.
1304 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1305 (_Hashtable_base::_Equal_hash_code): Define new class template.
1306 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1309 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1310 Replace with _M_get non-static member function.
1311 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1313 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1314 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1316 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1317 _S_get accessors for members in EBO helpers.
1318 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1319 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1321 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1323 (_Hashtable_base::_M_eq()): Remove non-const overload.
1325 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1327 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1329 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1331 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1334 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1336 * config/os/solaris/solaris2.10: Move to ...
1337 * config/os/solaris: ... this.
1338 * configure.host (os_include_dir): Adapt.
1339 (abi_baseline_pair): Remove Solaris 10 handling.
1340 * config/abi/post/i386-solaris2.10: Remove.
1341 * config/abi/post/sparc-solaris2.10: Remove.
1342 * config/abi/post/i386-solaris2.11: Rename to ...
1343 * config/abi/post/i386-solaris: ... this.
1344 * config/abi/post/sparc-solaris2.11: Rename to ...
1345 * config/abi/post/sparc-solaris: ... this.
1347 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1350 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1353 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1355 * include/std/variant (__visit_with_index): Remove typedef.
1356 (__deduce_visit_result): New tag type.
1357 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1358 visitation of possibly-valueless variants, forwarding to __do_visit
1359 with the relevant tag type.
1360 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1361 and make lambda return void.
1362 (__variant_construct): Likewise.
1363 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1364 __raw_idx_visit and make lambda return void.
1365 (_Multi_array::__untag_result): Add metafunction to check the function
1366 pointer type for a tag type that dictates the kind of visitation.
1367 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1368 Use decltype(auto) instead of tagged function pointer type.
1369 (__gen_vtable_impl): Remove bool non-type parameter and unused
1370 _Variant_tuple parameter.
1371 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1372 (__gen_vtable_impl::__do_visit_invoke): Remove.
1373 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1374 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1375 for the visit<R> case, rather than dispatching to separate functions.
1376 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1378 (variant::swap): Likewise.
1379 (__do_visit): Replace two non-type template parameters with a single
1380 type parameter, so that the caller must specify the visitor's return
1381 type (or one of the tag types).
1382 (visit): Deduce a return type from the visitor and use the
1383 __deduce_visit_result tag to enforce that all overloads return the
1385 (visit<R>): Call __do_visit<R> with explicit result type.
1386 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1389 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1391 nonesuch is insufficiently useless (lwg2996)
1392 * include/std/type_traits (struct __nonesuch): Added private base
1393 class to make __nonesuch not an aggregate and removed deleted default
1395 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1396 (operator=(const pair&)): Use __nonesuch instead of
1397 __nonesuch_no_braces.
1398 (operator=(pair&&)): Likewise
1399 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1400 of __nonesuch_no_braces.
1401 (operator=(tuple&&)): Likewise
1402 * include/experimental/type_traits (struct nonesuch): Added private
1403 base class to make nonesuch not an aggregate and removed deleted
1404 default constructor.
1405 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1406 * testsuite/experimental/type_traits/nonesuch.cc: New.
1408 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1410 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1411 (_Function_handler): Remove partial specializations for void return
1412 types and pointers to member.
1413 (_Function_handler::_M_manager): Adapt to removal of
1414 _Simple_type_wrapper.
1415 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1416 * include/std/functional (_Bind_result::__enable_if_void)
1417 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1418 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1420 * include/std/future (__future_base::_Task_state::_M_run)
1421 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1422 change return type of lambda expressions.
1424 * include/bits/invoke.h (__invoke_r): Define new function implementing
1425 the INVOKE<R> pseudo-function.
1426 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1427 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1429 * include/std/type_traits (__is_nt_convertible_helper): Define it
1430 unconditionally, not only for C++20.
1431 (__is_nothrow_convertible): Define internal trait for use in C++11.
1432 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1433 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1434 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1435 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1436 that has nothrow explicit conversion but potentially-throwing implicit
1438 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1439 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1440 function to only consider implicit conversions.
1441 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1443 * include/std/iterator: Include <iosfwd> instead of <istream> and
1446 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1447 Remove unused, non-standard function.
1449 * include/bits/regex.h (match_results::max_size()): Adjust return
1450 value to account for prefix/suffix/unmatched subs.
1451 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1452 reset the contained sub matches.
1453 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1454 function to set result state following a failed match.
1455 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1456 sub_match states after _M_resize. Use _M_establish_failed_match.
1459 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1460 Replace single _Callable parameter with variadic _Args pack, to
1461 forward them directly to the tuple of decayed copies.
1462 * testsuite/30_threads/thread/cons/69724.cc: New test.
1464 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1466 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1467 * include/bits/basic_string.h: (operator=(const basic_string&):
1468 Move allocator decision to assign.
1469 (assign(const basic_string&)): Move allocator decision here.
1470 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1472 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1475 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1477 * testsuite/util/testsuite_allocator.h (memory_resource)
1478 (default_resource_mgr): Fix indentation.
1480 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1481 Use operator-> to access raw pointer member.
1482 * testsuite/23_containers/vector/59829.cc: Likewise.
1483 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1484 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1485 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1487 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1488 its constructors and equality operators. Change converting
1489 constructors to use operator-> to access private member of the other
1491 (PointerBase_void::operator->()): Add, for access to private member.
1492 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1493 (operator==(PointerBase, PointerBase)): Remove.
1494 (operator!=(PointerBase, PointerBase)): Remove.
1496 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1497 not assume field called _M_head_impl is the first tuple element.
1498 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1499 implementation more accurate.
1500 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1501 empty pointer type and non-empty deleter.
1503 LWG 2899 - Make is_move_constructible correct for unique_ptr
1504 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1505 move assignment operator.
1506 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1507 (__uniq_ptr_data): New class template with conditionally deleted
1509 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1510 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1511 constructor and move assignment operator as defaulted.
1512 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1513 __uniq_ptr_impl::release().
1514 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1515 to __uniq_ptr_impl::reset(pointer).
1516 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1517 Check for new __uniq_ptr_data type.
1518 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1520 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1522 PR libstdc++/90454.cc path construction from void*
1523 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1524 pointers to void are rejected as well as void.
1525 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1526 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1528 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1530 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1531 <remark> elements. Fix formatting of bibliography references.
1533 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1535 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1537 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1539 Remove Profile Mode, deprecated since 7.1.0
1540 * doc/Makefile.am: Remove XML file for profile mode docs.
1541 * doc/Makefile.in: Regenerate.
1542 * doc/xml/authors.xml: Remove authors of profile mode docs.
1543 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1545 * doc/xml/manual/debug.xml: Likewise.
1546 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1547 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1548 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1549 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1551 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1553 * doc/html/*: Regenerate.
1554 * include/Makefile.am: Remove profile mode headers.
1555 * include/Makefile.in: Regenerate.
1556 * include/bits/c++config (std::__profile): Remove namespace.
1557 [_GLIBCXX_PROFILE]: Remove checks for macro.
1558 * include/profile/array: Remove.
1559 * include/profile/base.h: Remove.
1560 * include/profile/bitset: Remove.
1561 * include/profile/deque: Remove.
1562 * include/profile/forward_list: Remove.
1563 * include/profile/impl/profiler.h: Remove.
1564 * include/profile/impl/profiler_algos.h: Remove.
1565 * include/profile/impl/profiler_container_size.h: Remove.
1566 * include/profile/impl/profiler_hash_func.h: Remove.
1567 * include/profile/impl/profiler_hashtable_size.h: Remove.
1568 * include/profile/impl/profiler_list_to_slist.h: Remove.
1569 * include/profile/impl/profiler_list_to_vector.h: Remove.
1570 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1571 * include/profile/impl/profiler_node.h: Remove.
1572 * include/profile/impl/profiler_state.h: Remove.
1573 * include/profile/impl/profiler_trace.h: Remove.
1574 * include/profile/impl/profiler_vector_size.h: Remove.
1575 * include/profile/impl/profiler_vector_to_list.h: Remove.
1576 * include/profile/iterator_tracker.h: Remove.
1577 * include/profile/list: Remove.
1578 * include/profile/map: Remove.
1579 * include/profile/map.h: Remove.
1580 * include/profile/multimap.h: Remove.
1581 * include/profile/multiset.h: Remove.
1582 * include/profile/ordered_base.h: Remove.
1583 * include/profile/set: Remove.
1584 * include/profile/set.h: Remove.
1585 * include/profile/unordered_base.h: Remove.
1586 * include/profile/unordered_map: Remove.
1587 * include/profile/unordered_set: Remove.
1588 * include/profile/vector: Remove.
1589 * scripts/run_doxygen: Do not process profile mode headers.
1590 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1592 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1593 Remove dg-skip-if for profile mode.
1594 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1595 preprocessor check for profile mode.
1596 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1597 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1599 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1601 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1602 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1603 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1604 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1605 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1607 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1609 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1611 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1613 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1614 preprocessor check for profile mode.
1615 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1617 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1618 Remove dg-skip-if for profile mode.
1619 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1620 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1621 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1622 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1623 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1624 * testsuite/Makefile.am: Remove profile_flags variable and
1625 * testsuite/Makefile.am: Remove profile_flags variable and
1626 check-profile target.
1627 * testsuite/Makefile.in: Regenerate.
1628 * testsuite/ext/profile/all.cc: Remove.
1629 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1630 * testsuite/ext/profile/profiler_algos.cc: Remove.
1631 * testsuite/ext/profile/replace_new.cc: Remove.
1632 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1633 preprocessor check for profile mode.
1634 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1635 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1636 (check_v3_target_normal_mode): Do not check for profile mode macro.
1637 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1639 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1640 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1641 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1642 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1643 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1644 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1645 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1646 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1647 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1648 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1650 Remove array_allocator extension, deprecated since 4.9.0
1651 * doc/xml/manual/allocator.xml: Remove documentation for
1653 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1654 * doc/xml/manual/using.xml: Remove header from documentation.
1655 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1656 * include/Makefile.in: Regenerate.
1657 * include/ext/array_allocator.h: Remove.
1658 * include/precompiled/extc++.h: Do not include removed header.
1659 * testsuite/ext/array_allocator/1.cc: Remove.
1660 * testsuite/ext/array_allocator/2.cc: Remove.
1661 * testsuite/ext/array_allocator/26875.cc: Remove.
1662 * testsuite/ext/array_allocator/3.cc: Remove.
1663 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1664 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1665 * testsuite/ext/array_allocator/check_new.cc: Remove.
1666 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1667 * testsuite/ext/headers.cc: Do not include removed header.
1669 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1671 * include/bits/stl_bvector.h
1672 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1674 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1676 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1678 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1680 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1682 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1684 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1686 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1688 (_Bit_iterator::operator-(difference_type)): Likewise.
1689 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1690 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1692 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1693 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1695 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1698 * testsuite/util/thread/all.h: Do not use remove_pointer for
1699 std::thread::native_handle_type.
1702 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1703 (_Variant_storage<true, Types...>::_M_reset()))
1704 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1705 (__get_storage): Likewise.
1706 (variant): Add noexcept to friend declarations for __get and
1710 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1711 Use _Require for constraints.
1712 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1714 (__uniq_ptr_hash): New base class with conditionally-disabled call
1716 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1717 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1718 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1720 * include/bits/shared_ptr.h: Improve docs.
1721 * include/bits/shared_ptr_base.h: Likewise.
1722 * include/bits/stl_uninitialized.h: Likewise.
1723 * include/bits/unique_ptr.h: Likewise.
1724 * libsupc++/new: Likewise.
1726 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1728 * include/bits/stl_deque.h
1729 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1731 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1733 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1735 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1737 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1739 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1741 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1743 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1745 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
1748 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1749 (test01): Reserve for number of insertions to avoid rehash during test.
1750 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1752 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1757 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
1759 * include/experimental/bits/fs_path.h: Improve docs.
1760 * include/experimental/bits/net.h: Fix wrong header name in comment.
1761 Do not document implementation details.
1762 * include/experimental/netfwd: Fix doxygen grouping.
1764 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1766 * include/bits/stl_pair.h: Improve docs.
1767 * include/std/tuple: Likewise.
1769 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1771 * include/std/chrono: Improve docs.
1772 * include/std/ratio: Do not document implementation details.
1773 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1775 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1778 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1779 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1780 (__duration_common_type): New helper.
1781 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1782 __duration_common_type.
1783 (__timepoint_common_type_wrapper): Replace with ...
1784 (__timepoint_common_type): New helper.
1785 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1786 Use __time_point_common_type.
1787 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1788 (__common_type_impl): If either argument is transformed by decay,
1789 use the common_type of the decayed types.
1790 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1791 decayed, use __do_common_type_impl to get the common_type.
1792 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1793 (__do_member_type_wrapper, __member_type_wrapper)
1794 (__expanded_common_type_wrapper): Remove.
1795 (__common_type_pack, __common_type_fold): New helpers.
1796 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1797 __member_type_wrapper and __expanded_common_type_wrapper.
1798 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1799 Test zero-length template argument list.
1800 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1801 Test single argument cases and argument types that should decay.
1802 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1803 Adjust expected error.
1804 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1806 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1807 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1808 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1810 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1812 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1814 Make allocator propagation more consistent for
1815 operator+(basic_string) (P1165R1)
1816 * include/bits/basic_string.h
1817 (operator+(basic_string&&, basic_string&&): Changed resulting
1818 allocator to always be the one from the first parameter.
1819 * include/bits/basic_string.tcc
1820 (operator+(const _CharT*, const basic_string&)): Changed
1821 resulting allocator to be SOCCC on the second parameter's allocator.
1822 (operator+(_CharT, const basic_string&)): Likewise.
1823 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1825 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1828 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1830 * include/bits/regex.h: Improve docs.
1831 * include/bits/regex.tcc: Do not document implementation details.
1833 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1835 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1837 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1838 Add type printer for container types in std::__debug namespace.
1839 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1840 (gdb-tests): Use distinct parameters for the type of test and use of
1842 (gdb-test): Check for regex test even if 'whatis' test.
1843 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1845 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1846 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1847 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1848 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1849 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1850 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1851 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1853 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1855 * include/std/system_error (error_category): Fix comment.
1858 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1859 argument is an empty path.
1860 (absolute(const path&, error_code&)): Use invalid_argument as error
1861 code instead of no_such_file_or_directory.
1862 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1863 of non-existent paths and empty paths with both overloads of absolute.
1865 * include/std/system_error (error_category, error_code)
1866 (error_condition): Improve docs.
1867 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1868 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1869 to class documentation. Suppress documentation for implementation
1871 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1872 Suppress documentation for implementation details.
1874 * include/std/system_error (error_code): Remove friend declaration
1875 for hash<error_code>.
1876 (hash<error_code>::operator()): Use public member functions to access
1878 (hash<error_condition>::operator()): Use address of category, not
1879 its object representation.
1880 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1881 Use public member functions to access value and category.
1882 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1884 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1886 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1887 * include/bits/hashtable_policy.h
1888 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1889 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1890 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1891 smaller than input value rather than always greater. Preserve
1892 _M_next_resize if called with 0 input. Use __builtin_floorl.
1893 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1894 elements + number of insertions is greater than _M_next_resize. Start
1895 with 11 buckets if not told otherwise. Use __builtin_floorl.
1896 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1897 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1898 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1899 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1900 told otherwise. Use __builtin_floorl.
1901 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1902 to also validate _Power2_rehash_policy.
1903 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1906 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1909 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1913 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1914 overflow warning with -Wpedantic -Wsystem-headers.
1916 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1919 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1920 * include/bits/move.h (swap): Remove extra parentheses.
1922 * include/experimental/bits/lfts_config.h: Improve doc markup.
1923 * include/experimental/optional: Improve docs.
1924 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1925 (__constexpr_addressof): Remove.
1926 (optional::operator->()): Use std::__addressof().
1927 * include/std/optional (optional::operator->()): Adjust whitespace.
1928 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1929 that operator-> is still constexpr with overloaded operator&. Change
1930 to compile-only test.
1931 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1934 * include/bits/shared_ptr.h: Improve docs.
1935 * include/bits/shared_ptr_atomic.h: Likewise.
1936 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1938 * include/bits/basic_string.h: Fix iterator/index confusion in
1940 * include/bits/range_access.h: Fix Doxygen warnings.
1941 * include/bits/refwrap.h: Do not document implementation details.
1942 (ref, cref): Group docs with reference_wrapper.
1943 * include/std/fstream: Fix Doxygen markup.
1944 * libsupc++/initializer_list (begin, end): Group docs with
1947 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1949 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1950 * include/std/mutex: Likewise.
1951 * include/std/shared_mutex: Likewise.
1953 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1954 * include/bits/fs_fwd.h: Likewise.
1955 * include/bits/fs_ops.h: Likewise.
1956 * include/bits/fs_path.h: Likewise.
1957 * include/std/filesystem: Likewise.
1959 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1960 * include/experimental/buffer: Likewise.
1961 * include/experimental/executor: Likewise.
1962 * include/experimental/internet: Likewise.
1963 * include/experimental/io_context: Likewise.
1964 * include/experimental/net: Likewise.
1965 * include/experimental/netfwd: Likewise.
1966 * include/experimental/socket: Likewise.
1967 * include/experimental/timer: Likewise.
1969 * doc/doxygen/doxygroups.cc: Move description of experimental group
1971 * include/experimental/algorithm: Add to libfund-ts doc group.
1972 * include/experimental/any: Likewise. Do not document implementation
1974 * include/experimental/array: Add to libfund-ts doc group.
1975 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1976 for Library Fundamentals.
1977 * include/experimental/chrono: Add to libfund-ts doc group.
1978 * include/experimental/deque: Likewise.
1979 * include/experimental/forward_list: Likewise.
1980 * include/experimental/functional: Likewise.
1981 * include/experimental/iterator: Likewise.
1982 * include/experimental/list: Likewise.
1983 * include/experimental/map: Likewise.
1984 * include/experimental/memory: Likewise.
1985 * include/experimental/memory_resource: Likewise. Improve docs.
1987 * include/experimental/numeric: Add to libfund-ts doc group.
1988 * include/experimental/optional: Likewise.
1989 * include/experimental/propagate_const: Likewise.
1990 * include/experimental/random: Likewise.
1991 * include/experimental/ratio: Likewise.
1992 * include/experimental/regex: Likewise.
1993 * include/experimental/set: Likewise.
1994 * include/experimental/source_location: Likewise.
1995 * include/experimental/string: Likewise.
1996 * include/experimental/string_view: Likewise.
1997 * include/experimental/system_error: Likewise.
1998 * include/experimental/tuple: Likewise.
1999 * include/experimental/type_traits: Likewise.
2000 * include/experimental/unordered_map: Likewise.
2001 * include/experimental/unordered_set: Likewise.
2002 * include/experimental/utility: Likewise.
2003 * include/experimental/vector: Likewise.
2004 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2005 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2006 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2008 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2009 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2010 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2011 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2012 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2014 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2015 * include/experimental/bits/fs_fwd.h: Improve docs.
2016 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2017 * include/experimental/bits/fs_path.h: Likewise.
2018 (path, filesystem_error, u8path): Improve docs.
2019 * include/experimental/filesystem: Link to docs for TS.
2021 * config/allocator/new_allocator_base.h (__allocator_base): Add
2022 workaround for Doxygen bug #6945.
2023 * include/std/memory: Improve docs. Define group for pointer safety.
2024 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2025 conditional to suppress documentation for implementation details.
2027 * include/bits/specfun.h: Improve docs.
2028 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2031 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2032 (std::experimental): Add docs.
2033 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2034 namespace to nothing when generating docs.
2035 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2036 * include/std/chrono (std::chrono): Likewise.
2037 * include/std/functional (std::placeholders): Likewise.
2038 * include/std/thread (std::this_thread): Likewise.
2040 * include/parallel/settings.h: Fix Doxygen markup.
2042 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2043 anything unless PB_DS_CLASS_C_DEC is defined.
2044 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2045 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2046 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2047 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2048 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2049 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2050 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2052 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2053 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2054 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2055 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2056 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2057 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2058 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2059 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2060 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2061 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2062 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2064 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2065 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2067 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2070 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2071 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2072 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2075 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2077 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2078 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2079 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2080 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2081 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2082 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2084 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2085 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2088 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2091 * include/std/complex (__complex_proj): Return parameter unchanged.
2092 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2093 floating-point types to take std::complex arguments.
2094 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2095 floating-point types.
2096 * testsuite/26_numerics/complex/proj.cc: New test.
2098 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2100 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2101 to _Lock_policyE[012].
2102 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2104 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2106 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2107 macros accidentally left in.
2108 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2109 unnecessary -lstdc++fs option. Fix test for mingw.
2110 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2113 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2115 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2117 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2119 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2121 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2122 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2125 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2127 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2130 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2131 class template and partial specialization.
2134 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2136 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2137 functions to convert a value to an integral type.
2138 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2139 (fill_n): Convert _Size parameter to an integral type.
2140 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2141 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2142 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2143 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2144 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2145 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2147 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2149 Adding noexcept-specification on tuple constructors (LWG 2899)
2150 * libstdc++-v3/include/std/tuple:
2151 (tuple()): Add noexcept-specification.
2152 (tuple(const _Elements&...)): Likewise
2153 (tuple(_UElements&&...)): Likewise
2154 (tuple(const tuple<_UElements...>&)): Likewise
2155 (tuple(tuple<_UElements...>&&)): Likewise
2156 (tuple(const _T1&, const _T2&)): Likewise
2157 (tuple(_U1&&, _U2&&)): Likewise
2158 (tuple(const tuple<_U1, _U2>&): Likewise
2159 (tuple(tuple<_U1, _U2>&&): Likewise
2160 (tuple(const pair<_U1, _U2>&): Likewise
2161 (tuple(pair<_U1, _U2>&&): Likewise
2162 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2164 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2167 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2168 arguments with __restrict.
2170 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2172 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2174 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2176 * include/experimental/bits/fs_path.h
2177 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2178 avoid redundant call to _S_convert_loc with non-const pointers.
2180 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2181 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2182 * testsuite/21_strings/basic_string/hash/hash.cc
2183 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2184 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2185 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2187 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2188 wstring::_M_replace_dispatch with more specific patterns.
2189 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2190 Create const std::string to avoid redundant call to _S_convert_loc
2191 with non-const pointers.
2192 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2193 avoid unnecessary basic_string::assign instantiations.
2195 * include/std/memory (__uses_alloc_args): Add string-literal to
2196 static_assert, to match the one in __uses_alloc.
2197 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2198 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2199 for recursive uses-allocator construction of nested pairs.
2200 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2203 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2205 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2206 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2207 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2208 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2210 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2211 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2212 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2213 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2214 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2215 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2216 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2218 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2221 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2222 * include/std/scoped_allocator [__cplusplus > 201703L]
2223 (scoped_allocator_adaptor::construct): Define in terms of
2224 uses_allocator_construction_args, as per P0591R4.
2225 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2226 * testsuite/util/testsuite_allocator.h: Remove name of unused
2229 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2231 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2232 * doc/html/*: Regenerate.
2234 * include/bits/fs_path.h (operator<, operator<=, operator>)
2235 (operator>=, operator==, operator!=): Make hidden friends, as per
2237 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2238 string type in test.
2239 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2241 * include/std/any (any::any(ValueType&&)): Use __and_v.
2242 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2245 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2247 * include/std/type_traits (__result_of_memfun): Use remove_reference
2248 instead of __remove_cvref_t and remove redundant is_same check.
2249 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2251 * include/experimental/string_view (basic_string_view::pointer)
2252 (basic_string_view::reference): Fix to refer to non-const value_type.
2253 * include/bits/basic_string.h (basic_string): Use __sv_check and
2254 __sv_limit instead of basic_string_view::_M_check and
2255 basic_string_view::_M_limit.
2256 * include/std/string_view (__sv_check, __sv_limit): New
2257 helper functions to replace basic_string_view::_M_check and
2258 basic_string_view::_M_limit.
2259 (basic_string_view): Add static assertions to enforce ill-formed
2260 requirement for traits_type::char_type from P1148R0, and to enforce
2261 required properties of char-like types.
2262 (basic_string_view::pointer, basic_string_view::reference): Fix to
2263 refer to non-const value_type.
2264 (basic_string_view::operator[], basic_string_view::at)
2265 (basic_string_view::front, basic_string_view::back)
2266 (basic_string_view::data): Use const_reference and const_pointer
2267 typedefs for return types.
2268 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2269 (hash<wstring_view>): Fix argument_type typedef.
2270 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2271 char/1.cc: Fix expected return type of basic_string_view::data().
2272 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2273 wchar_t/1.cc: Likewise.
2274 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2275 char/1.cc: Likewise.
2276 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2277 wchar_t/1.cc: Likewise.
2278 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2280 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2281 Check reference and pointer typedefs.
2282 * testsuite/experimental/string_view/requirements/typedefs.cc:
2284 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2285 Fix expected return type of basic_string_view::data().
2286 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2288 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2290 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2294 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2295 Avoid a runtime check for types that can never be stored in std::any.
2296 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2299 PR libstdc++/90220 (partial)
2300 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2301 not attempt ill-formed static_cast to pointers to non-object types.
2302 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2305 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2306 prevent -Wcatch-value warning.
2308 * include/std/variant (__variant_construct): Use template parameter
2309 type instead of equivalent decltype-specifier.
2310 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2311 Replace forward with move.
2312 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2313 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2314 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2315 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2316 index after construction succeeds.
2317 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2318 if-constexpr checks that are always true. Use __remove_cvref_t instead
2319 of remove_reference so that is_nothrow_move_constructible check
2320 doesn't use a const rvalue parameter. In the potentially-throwing case
2321 construct a temporary and move assign it, as per LWG 2904.
2322 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2323 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2324 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2325 construct a temporary and move assign from it, as per LWG 2904.
2326 * testsuite/20_util/variant/exception_safety.cc: Check that
2327 assignment operators have strong exception safety guarantee.
2329 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2331 Document PSTL linker flags
2333 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2335 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2337 * include/std/variant (__detail::__variant::_Traits): Make
2338 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2339 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2341 (__detail::__variant::_Copy_assign_alias): Only depend on
2342 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2343 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2344 move assignment operators.
2347 * include/std/variant (variant::__not_self): New helper for the
2348 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2349 (variant::__to_type_impl): Remove.
2350 (variant::__to_type): Add default argument to check pack size, instead
2351 of using __to_type_impl.
2352 (variant::__accepted_type): Add default argument using __not_self.
2353 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2354 for variant(T&&) constructor constraint.
2355 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2356 Extract __accepted_type into a named template parameter for reuse in
2357 other constraints and in the exception specification.
2358 (variant::variant(in_place_type_t<T>, Args&&...))
2359 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2360 (variant::variant(in_place_index_t<T>, Args&&...))
2361 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2362 (variant::operator=T&&)): Remove redundant && from trait arguments.
2363 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2364 isn't used for in_place_type or in_place_index arguments.
2366 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2367 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2368 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2370 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2371 Bernd Edlinger <bernd.edlinger@hotmail.de>
2372 Jakub Jelinek <jakub@redhat.com>
2375 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2376 general-regs-only target attribute for ARM.
2378 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2381 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2382 specialization also depend on is_nothrow_move_constructible.
2383 * include/std/variant (__detail::__variant::__never_valueless()):
2384 Only true if the variant would have a move assignment operator.
2385 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2386 Check __never_valueless<T...>().
2387 (variant::emplace): Only perform non-throwing move assignments
2388 for never-valueless alternatives if the variant has a move assignment
2390 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2391 types can be emplaced into non-assignable variants.
2392 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2393 don't get copied when emplaced into non-assignable variants.
2395 * include/std/variant (__detail::__variant::__ref_cast): Remove
2397 (__detail::__variant::_Uninitialized::_M_get)
2398 (__detail::__variant::__get)
2399 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2401 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2403 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2405 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2406 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2407 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2408 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2410 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2412 Delegate PSTL configuration to pstl/pstl_config.h
2414 * include/bits/c++config: Remove explicit PSTL configuration
2415 macros and use definitions from <pstl/pstl_config.h>.
2417 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2419 Cleanup algorithm implementations
2420 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2422 (mismatch): Forward execution policy.
2423 (equal): Qualify call to std::equal().
2424 (partial_sort): Forward execution policy.
2425 (inplace_merge): Forward execution policy.
2427 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2429 Improve implementation of parallel equal()
2430 * include/pstl/algorithm_impl.h
2431 (__internal::__brick_equal): use "4 iterator" version of
2433 (__internal::__brick_equal): use simd for random access
2434 iterators on unsequenced execution policies.
2435 (__internal::__pattern_equal): add "4 iterator" version
2436 (__internal::__pattern_equal): dispatch to simd __brick_equal
2437 for vector-only execution policies.
2438 (__internal::__pattern_equal): dispatch to __parallel_or for
2439 parallel execution policies.
2440 * include/pstl/glue_algorithm_impl.h
2441 (std::equal): dispatch to "4 iterator" version of
2442 __internal::__pattern_equal().
2444 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2447 * include/bits/forward_list.h (operator==): Do not use operator!= to
2449 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2450 earlier in the list, so that sort is stable.
2451 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2452 * testsuite/23_containers/forward_list/comparable.cc: Test with
2453 types that meet the minimum EqualityComparable and LessThanComparable
2454 requirements. Remove irrelevant comment.
2456 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2457 Do not depend on whether all alternative types are move constructible.
2458 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2459 from the operand when deciding whether to perform the assignment.
2460 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2461 with deleted move constructor and deleted move assignment operator.
2462 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2463 behaviour of variants with DeletedMoves as an alternative.
2464 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2465 (move_ctor, move_assign): Check that moving a variant with a
2466 DeletedMoves alternative falls back to copying instead of moving.
2468 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2469 from static_assert declarations.
2471 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2472 actually match its name.
2473 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2474 (test_swap()): Fix result for MoveCtorOnly and check
2475 MoveCtorAndSwapOnly.
2477 * include/std/optional (optional::value_or(U&&) &&): Add missing
2478 constexpr specifier.
2479 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2480 for disengaged optionals and rvalue optionals.
2481 * testsuite/20_util/optional/observers/4.cc: Likewise.
2483 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2485 * include/pstl/algorithm_impl.h: Uglify identfiers.
2486 * include/pstl/numeric_impl.h: Uglify identfiers.
2487 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2489 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2491 * include/bits/c++config:
2492 Add definition for __PSTL_ASSERT.
2493 Add definition for __PSTL_ASSERT_MSG.
2494 * include/pstl/algorithm_impl.h: Replace use of assert().
2495 * include/pstl/numeric_impl.h: Replace use of assert().
2496 * include/pstl/parallel_backend_tbb.h:
2497 Replace use of assert().
2498 Replace use of __TBB_ASSERT().
2499 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2501 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2504 * src/c++17/memory_resource.cc
2505 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2506 needed to allow placing a _Chunk at the end of the buffer.
2507 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2509 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2511 * doc/xml/faq.xml: Add information about emergency EH pool.
2512 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2513 Move outdated information on mt_allocator to a separate section.
2514 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2515 doesn't affect the default allocator.
2517 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2521 * testsuite/20_util/variant/89851.cc: New test.
2523 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2525 * include/std/variant: Adjust whitespace. Add comments.
2526 (_Multi_array): Leave primary template undefined.
2527 (_Multi_array<_Tp>): Define partial specialization for base case of
2529 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2530 which is always a reference.
2531 (__gen_vtable::_S_apply()): Remove function, inline body into
2532 default member initializer.
2533 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2535 * include/std/variant (__variant_idx_cookie): Add member type.
2536 (__visitor_result_type): Remove.
2537 (__do_visit): Use invoke_result instead of __visitor_result_type.
2538 * testsuite/20_util/variant/visit.cc: New test.
2541 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2543 * testsuite/20_util/variant/90008.cc: New test.
2545 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2547 * include/pstl/algorithm_impl.h: Add namespace qualification.
2548 * include/pstl/execution_defs.h: Add namespace qualification.
2549 * include/pstl/execution_impl.h: Add namespace qualification.
2550 * include/pstl/numeric_impl.h: Add namespace qualification.
2551 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2552 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2553 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2555 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2557 Fix visit<R> for variant.
2558 * include/std/variant (__do_visit): Add a template parameter
2559 for enforcing same return types for visit.
2560 (__gen_vtable_impl): Likewise.
2561 (_S_apply_single_alt): Adjust.
2562 (__visit_invoke_impl): New. Handle casting to void.
2563 (__do_visit_invoke): New. Enforces same return types.
2564 (__do_visit_invoke_r): New. Converts return types.
2565 (__visit_invoke): Adjust.
2566 (__gen_vtable): Add a template parameter for enforcing
2567 same return types for visit.
2568 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2569 different return types.
2570 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2571 visitors with different return types don't accidentally
2572 compile with regular visitation.
2574 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2576 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2577 dg-require-filesystem-ts.
2579 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2581 * doc/xml/manual/status_cxx2020.xml: Update status.
2582 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2583 * testsuite/20_util/variant/visit_r.cc: New test.
2585 * include/bits/fs_dir.h (directory_iterator::operator*)
2586 (directory_iterator::operator->): Add noexcept.
2587 (operator==, operator!=): Replace namespace-scope equality operators
2588 for directory iterators with hidden friends.
2591 * config/abi/pre/gnu.ver: Add missing exports.
2592 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2595 * config/abi/pre/gnu.ver: Export new symbols.
2596 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2597 (recursive_directory_iterator::recursion_pending())
2598 (recursive_directory_iterator::disable_recursion_pending()): Remove
2599 inline definitions. Make noexcept.
2600 (recursive_directory_iterator::depth())
2601 (recursive_directory_iterator::operator*())
2602 (recursive_directory_iterator::operator->()): Make noexcept.
2603 (recursive_directory_iterator::_M_options)
2604 (recursive_directory_iterator::_M_pending): Remove data members.
2605 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2606 (recursive_directory_iterator::recursive_directory_iterator): Remove
2607 ctor-initializer. Use new constructor for _Dir_stack.
2608 (recursive_directory_iterator::options())
2609 (recursive_directory_iterator::recursion_pending())
2610 (recursive_directory_iterator::disable_recursion_pending()): Add
2611 non-inline definitions.
2612 (recursive_directory_iterator::depth()): Make noexcept.
2613 (recursive_directory_iterator::increment(error_code&))
2614 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2615 location of options and recursion_pending members.
2616 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2617 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2618 user-declared move constructor and assignment operator, to make the
2621 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2622 d_type == DT_UNKNOWN immediately.
2623 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2625 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2627 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2629 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2630 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2633 PR libstdc++/87431 (again)
2634 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2635 Define partial specialization for basic_string.
2636 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2637 shared_ptr and weak_ptr.
2638 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2640 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2642 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2644 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2646 * include/std/any (_Never_valueless_alt): Define explicit
2647 specialization for any.
2648 * include/std/variant (_Never_valueless_alt): Define primary template.
2649 (__never_valueless): Use _Never_valueless_alt instead of
2650 is_trivially_copyable.
2651 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2652 initializations to avoid try-catch overhead. Add special case for
2653 scalars produced by potentially-throwing conversions. Use
2654 _Never_valueless_alt instead of is_trivially_copyable for the
2655 remaining strong exception-safety cases.
2656 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2657 * testsuite/20_util/variant/87431.cc: Run both test functions.
2658 * testsuite/20_util/variant/exception_safety.cc: New test.
2659 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2660 so the variant becomes valueless.
2662 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2665 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2667 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2669 * include/std/string (__hash_string_base): New class template defining
2670 operator() for hashing strings.
2671 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2672 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2673 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2674 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2676 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2678 Use single-visitation in variant assignment and swap and relops.
2679 Also use indices instead of types when checking whether
2680 variants hold the same thing.
2681 * include/std/variant (__do_visit): Add a template parameter
2682 for index visitation, invoke with indices if index visitation
2684 (__variant_idx_cookie): New.
2685 (__visit_with_index): Likewise.
2686 (_Copy_assign_base::operator=): Do single-visitation with
2688 (_Move_assign_base::operator=): Likewise.
2689 (_Extra_visit_slot_needed): Adjust.
2690 (__visit_invoke): Call with indices if it's an index visitor.
2691 (relops): Do single-visitation with an index visitor.
2693 (__visitor_result_type): New.
2695 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2697 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2699 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2701 Don't revisit a variant we are already visiting.
2702 * include/std/variant (__variant_construct_single): New.
2703 (__variant_construct): Use it.
2704 (_M_destructive_move): Likewise.
2705 (_M_destructive_copy): Likewise.
2706 (_Copy_assign_base::operator=): Adjust.
2707 (_Move_assign_base::operator=): Likewise.
2710 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2713 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2714 destructor so they are not evaluated until the _Key type is complete.
2715 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2716 * testsuite/23_containers/set/85965.cc: New test.
2717 * testsuite/23_containers/unordered_set/85965.cc: New test.
2718 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2719 with regexp matching the corresponding _Rb_tree specialization.
2720 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2721 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2722 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2723 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2724 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2725 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2726 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2728 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2731 Fix based on a suggestion by Antony Polukhin.
2732 * include/std/variant (__never_valueless): New.
2734 (_Extra_visit_slot_needed): New.
2735 (_Multi_array): Use it.
2736 (_S_apply_all_alts): Likewise.
2738 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2741 Fix based on a suggestion by Antony Polukhin.
2742 * include/std/variant (__gen_vtable): Don't reserve an
2743 additional table slot, _Multi_array already does that.
2745 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2748 Fix based on a suggestion by Antony Polukhin.
2749 * include/std/variant (__variant_construct): Capture a pointer
2750 to the storage and visit just one variant.
2752 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
2754 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2755 Doxygen-generated pages with unstable URL.
2756 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2757 * doc/xml/manual/extensions.xml: Likewise.
2758 * doc/xml/manual/parallel_mode.xml: Likewise.
2759 * doc/xml/manual/support.xml: Likewise.
2761 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2762 avoid -Wconversion warnings.
2764 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
2766 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2767 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2768 (allstamped): Add stamp-pstl.
2769 (install-headers): Add ptsl_builddir.
2770 * include/Makefile.in: Regenerate.
2771 * include/bits/c++config: Add pstl configuration.
2772 * include/pstl/LICENSE.txt: New file.
2773 * include/pstl/algorithm_fwd.h: New file.
2774 * include/pstl/algorithm_impl.h: New file.
2775 * include/pstl/execution_defs.h: New file.
2776 * include/pstl/execution_impl.h: New file.
2777 * include/pstl/glue_algorithm_defs.h: New file.
2778 * include/pstl/glue_algorithm_impl.h: New file.
2779 * include/pstl/glue_execution_defs.h: New file.
2780 * include/pstl/glue_memory_defs.h: New file.
2781 * include/pstl/glue_memory_impl.h: New file.
2782 * include/pstl/glue_numeric_defs.h: New file.
2783 * include/pstl/glue_numeric_impl.h: New file.
2784 * include/pstl/memory_impl.h: New file.
2785 * include/pstl/numeric_fwd.h: New file.
2786 * include/pstl/numeric_impl.h: New file.
2787 * include/pstl/parallel_backend.h: New file.
2788 * include/pstl/parallel_backend_tbb.h: New file.
2789 * include/pstl/parallel_backend_utils.h: New file.
2790 * include/pstl/parallel_impl.h: New file.
2791 * include/pstl/pstl_config.h: New file.
2792 * include/pstl/unseq_backend_simd.h: New file.
2793 * include/pstl/utils.h: New file.
2794 * include/std/algorithm: Include parallel algorithm implementations.
2795 * include/std/execution: New file.
2796 * include/std/memory: Include parallel algorithm implementations.
2797 * include/std/numeric: Include parallel algorithm implementations.
2798 * include/std/version: Add parallel algorithms feature test macro.
2799 * testsuite/util/pstl/pstl_test_config.h: New file.
2800 * testsuite/util/pstl/test_utils.h: New file.
2801 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2802 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2803 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2804 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2805 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2806 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2807 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2808 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2809 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2810 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2811 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2812 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2813 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2814 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2815 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2816 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2817 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2818 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2819 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2820 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2821 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2822 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2823 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2824 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2825 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2826 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2827 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2828 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2829 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2830 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2831 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2832 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2833 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2834 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2835 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2836 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2837 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2838 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2839 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2840 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2841 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2842 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2843 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2844 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2845 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2846 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2847 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2848 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2849 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2850 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2851 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2852 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2853 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2854 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2855 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2856 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2857 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2858 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2859 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2860 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2861 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2862 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2863 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2864 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2865 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2866 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2867 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2868 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2869 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2870 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2871 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2872 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2873 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2874 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2875 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2876 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2877 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2878 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2879 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2880 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2881 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2882 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2883 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2884 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2885 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2886 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2887 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2888 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2889 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2890 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2891 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2892 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2893 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2894 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2895 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2896 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2897 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2898 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2899 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2900 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2901 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2902 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2903 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2904 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2905 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2906 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2908 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2910 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2911 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2912 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2913 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2914 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2915 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2916 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2917 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2918 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2919 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2920 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2921 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2922 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2923 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2924 when the special functions IS is enabled, not for C++17.
2925 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2927 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2928 without checks for special functions in C++17.
2929 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2933 * include/backward/hash_map: Use <> for includes not "".
2934 * include/backward/hash_set: Likewise.
2935 * include/backward/strstream: Likewise.
2936 * include/tr1/bessel_function.tcc: Likewise.
2937 * include/tr1/exp_integral.tcc: Likewise.
2938 * include/tr1/legendre_function.tcc: Likewise.
2939 * include/tr1/modified_bessel_func.tcc: Likewise.
2940 * include/tr1/riemann_zeta.tcc: Likewise.
2942 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2944 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2945 of extension allocators.
2946 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2947 Document new headers in 7.2, 8.1 and 9.1 releases.
2948 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2949 * doc/html/*: Regenerate.
2951 2019-03-12 John David Anglin <dave.anglin@bell.net>
2954 * testsuite/lib/libstdc++.exp: Locate libatomic.
2955 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2956 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2958 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2959 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2960 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2961 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2963 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2966 * configure.ac: Check for sockatmark.
2967 * crossconfig.m4: Check for sockatmark.
2968 * config.h.in: Regenerate.
2969 * configure: Regenerate.
2970 * include/experimental/internet (address_v4::_S_hton): Rename
2971 overloaded functions to _S_hton_16 and _S_ntoh_16.
2972 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2973 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2974 * include/experimental/socket (basic_socket::at_mark): Check
2975 _GLIBCXX_HAVE_SOCKATMARK.
2977 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2978 const variables instead of macros.
2981 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2982 Use correct type for len_aligned.
2983 * testsuite/20_util/hash/89629.cc: New test.
2985 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2988 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2989 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2990 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2991 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2992 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2993 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2994 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2995 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2996 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2997 memory_order_seq_cst to int.
2999 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3001 * doc/xml/manual/using.xml: Use link element instead of xref.
3002 * doc/html/*: Regenerate.
3004 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3006 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3009 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3010 parameters in deduction guides.
3011 * include/debug/multimap.h (multimap): Likewise.
3012 * include/debug/set.h (multimap): Likewise.
3013 * include/debug/multiset.h (multimap): Likewise.
3014 * include/debug/unordered_map (unordered_map): Likewise.
3015 (unordered_multimap): Likewise.
3016 * include/debug/unordered_set (unordered_set): Likewise.
3017 (unordered_multiset): Likewise.
3020 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3021 Invalidate all iterators in case of rehash.
3022 (unordered_multimap<>::_M_check_rehashed): Likewise.
3023 * include/debug/unordered_set
3024 (unordered_set<>::_M_check_rehashed): Likewise.
3025 (unordered_multiset<>::_M_check_rehashed): Likewise.
3026 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3028 2019-03-07 Andreas Schwab <schwab@suse.de>
3030 * config/abi/post/riscv64-linux-gnu: New directory.
3031 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3033 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3035 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3036 compile test to run. Fix typo.
3038 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3039 * doc/html/*: Regenerate.
3041 P0356R5 Simplified partial function application
3042 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3043 helpers for bind_front.
3044 (bind_front, __cpp_lib_bind_front): Define.
3045 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3047 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3049 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3050 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3051 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3052 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3054 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3056 PR libstdc++/86655 - std::assoc_legendre should not constrain
3057 the value of m (or x).
3058 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3059 __sph_legendre): If degree > order Don't throw, return 0.
3060 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3061 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3062 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3063 * testsuite/tr1/5_numerical_facilities/special_functions/
3064 02_assoc_legendre/pr86655.cc: New test.
3065 * testsuite/tr1/5_numerical_facilities/special_functions/
3066 22_sph_legendre/pr86655.cc: New test.
3068 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3071 Also PR libstdc++/85517
3072 * include/std/variant (__do_visit): New.
3073 (__variant_cast): Likewise.
3074 (__variant_cookie): Likewise.
3075 (__erased_*): Remove.
3076 (_Variant_storage::_S_vtable): Likewise.
3077 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3078 (_Variant_storage::__M_reset): Adjust.
3079 (__variant_construct): New.
3080 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3081 __variant_construct.
3082 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3083 (_Move_ctor_base::__M_destructive_copy): New.
3084 (_Move_ctor_base::__M_destructive_move): Adjust to use
3085 __variant_construct.
3086 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3087 (_Copy_assign_alias): Adjust to check both copy assignment
3088 and copy construction for triviality.
3089 (_Move_assign_base::operator=): Adjust to use __do_visit.
3090 (_Multi_array): Add support for visitors that accept and return
3092 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3093 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3094 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3095 a __variant_cookie temporary for a variant that is valueless and..
3096 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3097 (__gen_vtable::_Array_type): Conditionally make space for
3098 the __variant_cookie visitor case.
3099 (__variant_construct_by_index): New.
3100 (get_if): Adjust to use std::addressof.
3101 (relops): Adjust to use __do_visit.
3102 (variant): Add __variant_cast and __variant_construct_by_index
3104 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3105 instead of self-destruction.
3106 (variant::swap): Adjust to use __do_visit.
3107 (visit): Reimplement in terms of __do_visit.
3108 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3109 * testsuite/20_util/variant/compile.cc: Adjust.
3110 * testsuite/20_util/variant/run.cc: Likewise.
3112 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3114 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3116 * testsuite/experimental/feat-char8_t.cc: Likewise.
3118 * include/std/type_traits [C++20] (is_bounded_array)
3119 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3121 * testsuite/20_util/is_bounded_array/requirements/
3122 explicit_instantiation.cc: New test.
3123 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3125 * testsuite/20_util/is_bounded_array/value.cc: New test.
3126 * testsuite/20_util/is_unbounded_array/requirements/
3127 explicit_instantiation.cc: New test.
3128 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3130 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3132 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3134 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3136 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3138 * include/c_compatibility/math.h [C++20] (lerp): Add using
3140 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3141 (__lerp): Define function template to implement lerp.
3142 (lerp(float, float, float), lerp(double, double, double))
3143 (lerp(long double, long double, long double)): Define for C++20.
3144 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3145 (midpoint(T, T), midpoint(T*, T*)): Define.
3146 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3147 * testsuite/26_numerics/lerp.cc: New test.
3148 * testsuite/26_numerics/midpoint/floating.cc: New test.
3149 * testsuite/26_numerics/midpoint/integral.cc: New test.
3150 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3152 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3154 PR libstdc++/88996 Implement P0439R0
3155 Make std::memory_order a scoped enumeration.
3156 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3157 add variables for the old enumerators. Adjust calls.
3158 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3159 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3161 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3163 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3166 * include/std/memory_resource (polymorphic_allocator): Add default
3167 template argument for C++20.
3168 (polymorphic_allocator::allocate_bytes)
3169 (polymorphic_allocator::deallocate_bytes)
3170 (polymorphic_allocator::allocate_object)
3171 (polymorphic_allocator::deallocate_object)
3172 (polymorphic_allocator::new_object)
3173 (polymorphic_allocator::delete_object): New member functions for
3175 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3178 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3181 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3184 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3186 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3187 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3189 * include/std/memory (uses_allocator_construction_args): New set of
3190 overloaded functions.
3191 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3193 * include/std/memory_resource (polymorphic_allocator::construct)
3194 [__cplusplus > 201703l]: Replace all overloads with a single function
3195 using uses_allocator_construction_args.
3196 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3198 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3200 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3203 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3204 stylesheet directories before check for xsltproc. Try to use
3205 xmlcatalog to find local stylesheet directory before trying hardcoded
3206 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3207 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3208 use xsltproc if xmlcatalog fails to find a local stylesheet.
3209 * configure.ac: Check for xmlcatalog.
3210 * Makefile.in: Regenerate.
3211 * configure: Likewise.
3212 * doc/Makefile.in: Likewise.
3213 * include/Makefile.in: Likewise.
3214 * libsupc++/Makefile.in: Likewise.
3215 * po/Makefile.in: Likewise.
3216 * python/Makefile.in: Likewise.
3217 * src/Makefile.in: Likewise.
3218 * src/c++11/Makefile.in: Likewise.
3219 * src/c++17/Makefile.in: Likewise.
3220 * src/c++98/Makefile.in: Likewise.
3221 * src/filesystem/Makefile.in: Likewise.
3222 * testsuite/Makefile.in: Likewise.
3224 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3227 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3228 container deduction guides.
3229 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3230 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3231 parameters in deduction guides.
3232 * include/bits/stl_multimap.h (multimap): Likewise.
3233 * include/bits/stl_multiset.h (multiset): Likewise.
3234 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3235 * include/bits/stl_set.h (set): Likewise.
3236 * include/bits/stl_stack.h (stack): Likewise.
3237 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3238 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3239 constrain parameters in deduction guides.
3240 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3242 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3244 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3245 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3246 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3247 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3249 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3251 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3254 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3255 to class template and partial specialization using void_t.
3256 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3258 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3261 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3262 copy and move members public.
3264 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3266 * include/std/type_traits (__underlying_type_impl): New helper to
3267 make underlying_type SFINAE-friendly.
3268 (underlying_type): Derive from __underlying_type_impl.
3269 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3273 * include/bits/char_traits.h (__constant_char_array): Check index is
3274 in range before dereferencing.
3275 (char_traits<char>::compare, char_traits<char>::find)
3276 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3277 immediately if n is zero.
3278 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3279 Remove workarounds for PR 67026.
3280 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3282 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3285 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3287 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3288 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3290 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3293 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3294 type to std::size_t and argument to type to long double.
3296 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3298 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3299 * config/abi/post/sparc64-linux-gnu: New directory.
3300 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3301 * config/abi/post/sparc64-linux-gnu/32: New directory.
3302 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3304 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3306 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3307 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3310 2019-02-22 Tom Honermann <tom@honermann.net>
3312 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3313 printers for u8string and u8string_view.
3315 2019-02-22 Tom Honermann <tom@honermann.net>
3317 * testsuite/18_support/byte/ops.cc: Validate
3318 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3319 std::to_integer<char32_t>.
3320 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3321 std::numeric_limits<char8_t>.
3322 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3323 std::numeric_limits<char8_t>::lowest().
3324 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3325 std::numeric_limits<char8_t>::max_digits10.
3326 * testsuite/18_support/type_info/fundamental.cc: Validate
3327 typeinfo for char8_t.
3328 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3329 std::from_chars with char8_t.
3330 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3331 Validate explicit instantiation of std::hash<char8_t>.
3332 * testsuite/20_util/is_integral/value.cc: Validate
3333 std::is_integral<char8_t>.
3334 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3335 Validate std::make_signed<char8_t>.
3336 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3337 Validate u8string construction from char8_t sources.
3338 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3340 * testsuite/21_strings/basic_string_view/operations/compare/
3341 char/70483.cc: Validate substr operations on u8string_view.
3342 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3343 the u8string_view typedef is defined.
3344 * testsuite/21_strings/char_traits/requirements/
3345 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3347 * testsuite/21_strings/char_traits/requirements/
3348 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3349 constexpr member functions.
3350 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3351 that the u8string typedef is defined.
3352 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3353 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3354 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3355 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3357 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3358 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3360 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3361 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3362 Validate std::atomic<char8_t>::is_always_lock_free
3363 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3364 Update line numbers.
3365 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3367 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3369 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3370 Validate std::experimental::pmr::u8string.
3371 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3372 u8string_view typedef is defined.
3373 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3374 char32_t to the typelists.
3376 2019-02-22 Tom Honermann <tom@honermann.net>
3378 * include/ext/typelist.h: Constrain a partial specialization of
3379 typelist::detail::append_ to only match chain<T1,T2>.
3381 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3384 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3385 class template with class. Replace move and copy member types with
3386 member alias templates, so they are only instantiated when needed.
3387 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3388 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3389 test for C++11/14/17 as well.
3390 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3393 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3396 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3397 _GLIBCXX_PURE to the alias declaration.
3399 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3401 * testsuite/21_strings/basic_string/literals/types.cc
3402 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3403 * testsuite/21_strings/basic_string/literals/values.cc
3404 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3405 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3406 potentially having different type.
3407 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3408 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3410 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3411 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3412 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3413 string literals only using basic character set.
3414 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3415 u8 literals to char.
3416 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3417 Test ATOMIC_CHAR8_T_LOCK_FREE.
3418 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3419 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3420 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3421 * testsuite/experimental/string_view/literals/types.cc
3422 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3424 * testsuite/experimental/string_view/literals/values.cc
3425 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3427 2019-02-19 Tom Honermann <tom@honermann.net>
3429 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3430 from char16_32_t.cc; validates numeric_limits<char8_t>.
3431 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3432 test cloned from types.cc; validates operator""s for char8_t
3434 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3435 test cloned from values.cc; validates construction and comparison
3437 * testsuite/21_strings/basic_string/requirements/
3438 /explicit_instantiation/char8_t/1.cc: New test cloned from
3439 char16_t/1.cc; validates explicit instantiation of
3440 basic_string<char8_t>.
3441 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3442 New test cloned from types.cc; validates operator""sv for char8_t
3443 returns u8string_view.
3444 * testsuite/21_strings/basic_string_view/literals/
3445 values-char8_t.cc: New test cloned from values.cc; validates
3446 construction and comparison of u8string_view values.
3447 * testsuite/21_strings/basic_string_view/requirements/
3448 explicit_instantiation/char8_t/1.cc: New test cloned from
3449 char16_t/1.cc; validates explicit instantiation of
3450 basic_string_view<char8_t>.
3451 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3452 New test cloned from char16_t/65049.cc; validates that
3453 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3454 * testsuite/21_strings/char_traits/requirements/char8_t/
3455 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3456 that char_traits<char8_t> member typedefs are present and correct.
3457 * testsuite/21_strings/char_traits/requirements/
3458 explicit_instantiation/char8_t/1.cc: New test cloned from
3459 char16_t/1.cc; validates explicit instantiation of
3460 char_traits<char8_t>.
3461 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3462 from char16_t.cc: validates
3463 codecvt<char16_t, char8_t, mbstate_t>.
3464 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3465 from char32_t.cc: validates
3466 codecvt<char32_t, char8_t, mbstate_t>.
3467 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3468 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3469 codecvt<char32_t, char8_t, std::mbstate_t>.
3470 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3471 test cloned from string.cc; validates filesystem::path construction
3473 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3474 the __cpp_lib_char8_t feature test macro is defined with the
3476 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3477 New test cloned from string.cc; validates filesystem::path
3478 construction from char8_t input.
3479 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3480 test cloned from types.cc; validates operator""sv for char8_t
3481 returns u8string_view.
3482 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3483 New test cloned from values.cc; validates construction and
3484 comparison of u8string_view values.
3485 * testsuite/experimental/string_view/requirements/
3486 explicit_instantiation/char8_t/1.cc: New test cloned from
3487 char16_t/1.cc; validates explicit instantiation of
3488 basic_string_view<char8_t>.
3489 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3490 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3493 2019-02-19 Tom Honermann <tom@honermann.net>
3495 P0482R5 char8_t: Standard library support
3496 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3497 typeinfo symbols for char8_t.
3498 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3499 (GLIBCXX_3.4.26): Add symbols for specializations of
3500 numeric_limits and codecvt that involve char8_t.
3501 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3502 * include/bits/atomic_base.h: Add atomic_char8_t.
3503 * include/bits/basic_string.h: Add std::hash<u8string> and
3504 operator""s(const char8_t*, size_t).
3505 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3507 * include/bits/char_traits.h: Add char_traits<char8_t>.
3508 * include/bits/codecvt.h: Add
3509 codecvt<char16_t, char8_t, mbstate_t>,
3510 codecvt<char32_t, char8_t, mbstate_t>,
3511 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3512 codecvt_byname<char32_t, char8_t, mbstate_t>.
3513 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3514 recognize char8_t as an integral type.
3515 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3517 (path::u8string): Return std::u8string when char8_t support is
3519 (path::generic_u8string): Likewise.
3520 (path::_S_convert): Handle conversion from char8_t input.
3521 (path::_S_str_convert): Likewise.
3522 * include/bits/functional_hash.h: Add hash<char8_t>.
3523 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3525 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3526 for new char8_t specializations.
3527 * include/bits/localefwd.h: Add missing declarations of
3528 codecvt<char16_t, char, mbstate_t> and
3529 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3530 codecvt<char16_t, char8_t, mbstate_t> and
3531 codecvt<char32_t, char8_t, mbstate_t>.
3532 * include/bits/postypes.h: Add u8streampos
3533 * include/bits/stringfwd.h: Add declarations of
3534 char_traits<char8_t> and u8string.
3535 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3536 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3538 (path::u8string): Return std::u8string when char8_t support is
3540 (path::generic_u8string): Likewise.
3541 (path::_S_convert): Handle conversion from char8_t input.
3542 (path::_S_str_convert): Likewise.
3543 * include/experimental/string: Add u8string.
3544 * include/experimental/string_view: Add u8string_view,
3545 hash<experimental::u8string_view>, and
3546 operator""sv(const char8_t*, size_t).
3547 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3548 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3549 as a character type.
3550 * include/std/limits: Add numeric_limits<char8_t>.
3551 * include/std/string_view: Add u8string_view,
3552 hash<experimental::u8string_view>, and
3553 operator""sv(const char8_t*, size_t).
3554 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3555 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3556 * libsupc++/atomic_lockfree_defines.h: Define
3557 ATOMIC_CHAR8_T_LOCK_FREE.
3558 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3559 codecvt.cc and limits.cc so that char8_t specializations of
3560 numeric_limits and codecvt and emitted.
3561 * src/c++11/Makefile.in: Likewise.
3562 * src/c++11/codecvt.cc: Define members of
3563 codecvt<char16_t, char8_t, mbstate_t>,
3564 codecvt<char32_t, char8_t, mbstate_t>,
3565 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3566 codecvt_byname<char32_t, char8_t, mbstate_t>.
3567 * src/c++11/limits.cc: Define members of
3568 numeric_limits<char8_t>.
3569 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3570 locale_init.cc and localename.cc.
3571 * src/c++98/Makefile.in: Likewise.
3572 * src/c++98/locale_init.cc: Add initialization for the
3573 codecvt<char16_t, char8_t, mbstate_t> and
3574 codecvt<char32_t, char8_t, mbstate_t> facets.
3575 * src/c++98/localename.cc: Likewise.
3576 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3578 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3580 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3581 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3582 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3584 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3586 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3587 * doc/html/*: Regenerate.
3589 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3590 * doc/html/*: Regenerate.
3592 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3593 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3594 allocator type in is_constructible checks.
3595 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3596 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3597 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3598 problematic type from LWG 2586 discussion.
3599 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3600 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3602 * configure.ac: Check for C11 timespec_get function.
3603 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3605 * config.h.in: Regenerate.
3606 * configure: Regenerate.
3607 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3608 std for C++17 and up.
3610 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3611 * include/bits/stl_queue.h
3612 (priority_queue(const Compare&, const Container&, const Alloc&))
3613 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3615 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3617 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3618 * include/bits/stl_queue.h (queue, priority_queue): Add static
3619 assertions to enforce LWG 2566 requirement on value_type.
3620 * include/bits/stl_stack.h (stack): Likewise.
3623 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3625 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3626 * include/bits/std_abs.h: Add comment about LWG 2735.
3627 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3629 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3632 * include/std/version [__cpp_impl_destroying_delete]
3633 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3634 * libsupc++/new [__cpp_impl_destroying_delete]
3635 (__cpp_lib_destroying_delete): Likewise.
3636 (destroying_delete_t, destroying_delete): Likewise, but define even
3637 when __cpp_impl_destroying_delete is not defined.
3638 * testsuite/18_support/destroying_delete.cc: New test.
3640 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3643 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3644 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3645 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3646 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3648 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3651 * include/bits/fs_path.h (path::has_root_name)
3652 (path::has_root_directory, path::has_root_path)
3653 (path::has_relative_path, path::has_parent_path)
3654 (path::has_filename, path::has_stem, path::has_extension)
3655 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3657 * src/c++17/fs_path.cc (path::has_root_name)
3658 (path::has_root_directory, path::has_root_path)
3659 (path::has_relative_path, path::has_parent_path)
3660 (path::has_filename, path::_M_find_extension): Add noexcept.
3662 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3664 PR libstdc++/89102 (partial)
3665 * include/std/type_traits (common_type<>): Define.
3666 (common_type<T>): Derive from common_type<T, T>.
3667 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3668 Test zero-length template argument list.
3669 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3670 Test additional single argument cases.
3671 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3672 Adjust expected error.
3674 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3677 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3679 * include/bits/stl_stack.h (stack): Likewise.
3680 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3681 * testsuite/23_containers/queue/deduction.cc: New test.
3682 * testsuite/23_containers/stack/deduction.cc: New test.
3685 * include/std/type_traits (__is_convertible_helper)
3686 (__is_convertible_helper<_From, _To, false>): Revert changes to
3687 support is_nothrow_convertible.
3688 (__is_nt_convertible_helper): New helper.
3689 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3691 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3692 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3695 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3696 __is_alloc_insertable_impl. Replace single type member with two
3697 members, one for each of copy and move insertable.
3698 (__is_move_insertable): New trait for internal use.
3699 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3700 (vector::_S_nothrow_relocate(true_type)): New functions to
3701 conditionally check if __relocate_a can throw.
3702 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3703 on __is_move_insertable.
3704 (vector::_S_do_relocate): New overloaded functions to conditionally
3706 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3707 based on _S_use_relocate.
3708 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3709 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3710 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3713 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3714 parameter unnamed. Add message to static assertion.
3715 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3716 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3719 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3722 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3724 (__is_bitwise_relocatable): ... to this.
3725 (__relocate_a_1): Adapt.
3726 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3727 (__is_bitwise_relocatable): ... to this.
3729 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3732 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3733 final component as well as from _M_pathname. Append the dot using
3734 operator+= instead of only to _M_pathname.
3735 (path::_M_find_extension): Reformat slightly.
3736 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3737 Add more test cases.
3739 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3741 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3743 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3745 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3746 constexpr specifiers from arg and proj.
3748 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3749 __shared_ptr instantiations used by gcc4-compatible ABI.
3751 * include/experimental/forward_list (experimental::erase): Qualify
3753 * include/experimental/list (experimental::erase): Likewise.
3754 * include/std/forward_list (std::erase): Likewise.
3755 * include/std/list (std::erase): Likewise.
3757 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3759 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3760 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3761 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3762 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3763 * testsuite/ext/array_allocator/26875.cc: Likewise.
3764 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3765 * testsuite/util/replacement_memory_operators.h: Likewise.
3766 * testsuite/util/testsuite_allocator.h: Likewise.
3768 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3769 normal mode vector, even for debug mode.
3770 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3771 Define alias template for normal mode vector.
3773 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3776 * config/locale/generic/c_locale.h (__convert_from_v)
3777 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3778 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3779 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3780 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3782 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3785 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3786 data member with static member function _S_use_relocate().
3787 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3788 (vector::_M_default_append): Use _S_use_relocate() instead of
3791 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3794 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3797 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3798 write to stderr instead of using printf.
3800 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3803 * include/bits/char_traits.h (__constant_string_p,
3804 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3807 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3809 Implement C++20 P0600r1.
3810 * include/backward/hash_map: Add nodiscard attribute to empty.
3811 * include/backward/hash_set: Likewise.
3812 * backward/hashtable.h: Likewise.
3813 * include/bits/basic_string.h: Likewise.
3814 * include/bits/forward_list.h: Likewise.
3815 * include/bits/hashtable.h: Likewise.
3816 * include/bits/regex.h: Likewise.
3817 * include/bits/stl_deque.h: Likewise.
3818 * include/bits/stl_list.h: Likewise.
3819 * include/bits/stl_map.h: Likewise.
3820 * include/bits/stl_multimap.h: Likewise.
3821 * include/bits/stl_multiset.h: Likewise.
3822 * include/bits/stl_queue.h: Likewise.
3823 * include/bits/stl_set.h: Likewise.
3824 * include/bits/stl_stack.h: Likewise.
3825 * include/bits/stl_tree.h: Likewise.
3826 * include/bits/stl_vector.h: Likewise.
3827 * include/bits/unordered_map.h: Likewise.
3828 * include/bits/unordered_set.h: Likewise.
3829 * include/debug/array: Likewise.
3830 * include/experimental/any: Likewise.
3831 * include/experimental/bits/fs_path.h: Likewise.
3832 * include/experimental/internet: Likewise.
3833 * include/experimental/string_view: Likewise.
3834 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3836 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3838 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3840 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3842 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3844 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3846 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3848 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3850 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3851 info_fn_imps.hpp: Likewise.
3852 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3853 left_child_next_sibling_heap_.hpp: Likewise.
3854 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3856 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3858 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3860 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3862 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3864 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3866 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3868 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3869 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3870 * include/ext/rope: Likewise.
3871 * include/ext/slist: Likewise.
3872 * include/ext/vstring.h: Likewise.
3873 * include/profile/array: Likewise.
3874 * include/std/array: Likewise.
3875 * include/tr1/array: Likewise.
3876 * include/tr1/hashtable.h: Likewise.
3877 * include/tr1/regex: Likewise.
3878 * include/tr2/dynamic_bitset: Likewise.
3879 * include/bits/alloc_traits.h: Add nodiscard attribute to
3881 * include/experimental/memory_resource: Likewise.
3882 * include/ext/alloc_traits.h: Likewise.
3883 * include/ext/array_allocator.h: Likewise.
3884 * include/ext/bitmap_allocator.h: Likewise.
3885 * include/ext/debug_allocator.h: Likewise.
3886 * include/ext/extptr_allocator.h: Likewise.
3887 * include/ext/mt_allocator.h: Likewise.
3888 * include/ext/new_allocator.h: Likewise.
3889 * include/ext/pool_allocator.h: Likewise.
3890 * include/ext/throw_allocator.h: Likewise.
3891 * include/std/scoped_allocator: Likewise.
3892 * libsupc++/eh_alloc.cc: Likewise.
3893 * include/std/future: Add nodiscard attribute to async.
3894 * libsupc++/new: Add nodiscard attribute to new.
3896 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3901 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3902 * include/bits/shared_ptr.h
3903 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3904 (allocate_shared): Change to use new tag type.
3905 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3906 Declare new member function.
3907 (_Sp_alloc_shared_tag): Define new type.
3908 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3909 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3910 _Sp_make_shared_tag::_S_eq to check type_info.
3911 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3912 Constrain to prevent being called with _Sp_alloc_shared_tag.
3913 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3914 Replace constructor with ...
3915 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3916 reference parameter so address of the new object can be returned to
3917 the caller. Obtain the allocator from the tag type.
3918 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3919 constructor with ...
3920 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3921 to the __shared_count constructor.
3922 (__allocate_shared): Change to use new tag type.
3923 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3925 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3927 * src/c++17/fs_ops.cc
3928 (equivalent(const path&, const path&, error_code&))
3929 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3930 compare files instead of relying on incomplete info returned by stat.
3933 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3934 if the path is already absolute.
3935 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3936 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3939 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3940 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3941 of filesystem::exists.
3942 (create_directories(const path&, error_code&)): Add assertions.
3943 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3944 Add workaround for bug in _wstat for paths with trailing slash.
3945 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3946 for expected behaviour on mingw.
3947 * testsuite/experimental/filesystem/operations/create_directories.cc:
3949 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3950 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3951 not test permissions on mingw targets.
3953 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3955 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3956 constructors and open members taking wide strings. Fix patterns for
3957 filesystem::path members to match wstring_view parameters. Add
3958 exports for shared_ptr members used by directory iterators.
3959 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3960 error code parameter if the file doesn't exist.
3961 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3963 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3964 values for mingw targets, where "/" is not an absolute path. Do not
3965 test symlinks on mingw targets.
3966 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3967 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3969 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3970 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3971 that each component of the path is created.
3972 * testsuite/experimental/filesystem/operations/create_directories.cc:
3974 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3975 permissions on mingw targets.
3976 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3977 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3978 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3979 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3981 * testsuite/experimental/filesystem/operations/permissions.cc:
3983 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3984 symlinks or permissions on mingw targets.
3985 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3986 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3987 symlinks on mingw targets.
3988 * testsuite/experimental/filesystem/operations/remove_all.cc:
3990 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3991 permissions on mingw targets.
3992 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3993 test symlinks on mingw targets.
3994 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3997 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4000 Warn about unused comparisons of shared_ptr/unique_ptr
4001 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4002 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4003 <, <=, >, >= for shared_ptr.
4004 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4006 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4008 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4009 as 201611L, because P0497R0 changes are supported.
4010 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4012 * include/bits/erase_if.h [__cplusplus > 201703L]
4013 (__cpp_lib_erase_if): Only define for C++2a.
4014 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4015 (__cpp_lib_null_iterators): Define.
4016 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4017 (__cpp_lib_null_iterators): Define.
4018 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4020 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4022 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4024 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4025 changes are supported.
4026 * include/std/optional (__cpp_lib_optional): Likewise.
4027 * include/std/variant (__cpp_lib_variant): Likewise.
4028 * include/std/version [!__STRICT_ANSI__]
4029 (__cpp_lib_uncaught_exceptions): Define as long integer.
4030 [__cplusplus >= 201703L] (__cpp_lib_any)
4031 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4032 (__cpp_lib_variant): Define for C++17.
4033 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4035 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4038 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4040 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4044 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4046 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4049 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4051 * doc/xml/manual/intro.xml: Include new section.
4052 * doc/xml/manual/status_cxx2017.xml: Document more
4053 implementation-defined properties of the library.
4054 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4055 * doc/html/*: Regenerate.
4057 * include/bits/refwrap.h [__cplusplus > 201703L]
4058 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4059 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4060 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4062 (reference_wrapper::operator()): Add static assertion.
4063 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4065 * include/std/chrono (duration_values::zero(), duration_values::min())
4066 (duration_values::max()): Add noexcept.
4067 (duration::zero(), duration::min(), duration::max()): Likewise.
4068 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4069 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4070 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4072 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4074 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4076 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4077 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4079 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4082 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4083 specialization for C++17 (P0513R0, LWG 2817).
4084 * testsuite/20_util/hash/nullptr.cc: New test.
4087 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4088 pattern for std::basic_stringbuf::str().
4090 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4091 basic_ostream::operator<< patterns.
4093 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4095 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4096 test failures on targets with 32-bit time_t.
4098 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4099 * include/std/deque: Likewise.
4100 * include/std/forward_list: Likewise.
4101 * include/std/list: Likewise.
4102 * include/std/string: Likewise.
4103 * include/std/vector: Likewise.
4104 * include/std/version: Likewise.
4105 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4106 * testsuite/23_containers/deque/erasure.cc: Likewise.
4107 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4108 * testsuite/23_containers/list/erasure.cc: Likewise.
4109 * testsuite/23_containers/map/erasure.cc: Likewise.
4110 * testsuite/23_containers/set/erasure.cc: Likewise.
4111 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4112 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4113 * testsuite/23_containers/vector/erasure.cc: Likewise.
4115 * include/experimental/internet [AI_NUMERICSERV]
4116 (resolver_base::numeric_service): Define conditionally.
4117 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4119 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4122 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4123 Jonathan Wakely <jwakely@redhat.com>
4126 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4127 (GLIBCXX_3.4.26): Add new exports.
4128 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4129 correct list of sources.
4130 * include/Makefile.in: Regenerate.
4131 * include/std/ostream (operator<<(nullptr_t)): New member function.
4132 * src/c++17/ostream-inst.cc: New file.
4133 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4136 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4138 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4139 of the source file containing the caller.
4140 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4141 directories created by test.
4142 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4144 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4146 * testsuite/experimental/filesystem/iterators/
4147 recursive_directory_iterator.cc: Likewise.
4149 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4151 PR tree-optimization/88775
4152 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4153 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4154 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4155 instead of __builtin_constant_p if available. Don't bother with
4156 the pointer comparison in C++11 and earlier.
4158 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4162 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4165 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4167 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4168 for filesystem::path. Give variables more distinctive names.
4170 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4171 member function to perform non-trivial assignment.
4172 (_Optional_payload_base::_M_move_assign): Likewise.
4173 (_Optional_payload<T, true, false, true>::operator=)
4174 (_Optional_payload<T, true, true, false>::operator=)
4175 (_Optional_payload<T, true, false, false>::operator=): Call
4176 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4179 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4180 test std::complex<long double> if long double format is IBM128.
4181 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4184 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4186 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4187 for old std::unique_ptr layout.
4188 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4189 to become valueless. Add filesystem::path tests.
4192 * include/std/optional (_Optional_payload_base): New class template
4193 for common code hoisted from _Optional_payload specializations. Use
4194 a template for the union, to allow a partial specialization for
4195 types with non-trivial destructors. Add constructors for in-place
4196 initialization to the union.
4197 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4198 to perform non-trivial copy construction, instead of relying on
4199 non-standard copy elision in a delegating constructor.
4200 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4201 non-trivial move construction.
4202 (_Optional_payload): Derive from _Optional_payload_base and use it
4203 for everything except the non-trivial assignment operators, which are
4205 (_Optional_payload<false, C, M>): Derive from the specialization
4206 _Optional_payload<true, false, false> and add a destructor.
4207 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4208 Forward to corresponding members of _Optional_payload.
4209 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4210 Hoist common members from _Optional_base.
4211 (_Optional_base): Make all members and base class public.
4212 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4213 _Optional_base_impl.
4214 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4215 support for new std::optional layout.
4216 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4219 * include/bits/locale_conv.h: Use <> for includes not "".
4220 * include/ext/random: Likewise.
4221 * include/ext/vstring.h: Likewise.
4223 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4225 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4226 (GLIBCXX_3.4.21): Likewise.
4228 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4231 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4232 to match the one that controls whether utimbuf and utime are declared.
4234 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4237 * include/bits/char_traits.h (char_traits::move): Do not pass null
4238 pointers to memmove.
4239 * include/bits/locale_facets.h
4240 (ctype<char>::widen(const char*, const char*, char*)): Do not
4241 pass null pointers to memcpy.
4242 (ctype<char>::narrow(const char*, const char*, char, char*)):
4244 (ctype<char>::do_widen(const char*, const char*, char*)):
4246 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4249 * doc/xml/manual/spine.xml: Update copyright years.
4250 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4251 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4252 for C++17 filesystem library.
4253 * doc/html/*: Regenerate.
4255 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4256 * config.h.in: Regenerate.
4257 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4258 alphabetically and add missing entries for copy_symlink,
4259 hard_link_count, rename, and resize_file.
4260 * configure: Regenerate.
4261 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4262 used unconditionally.
4263 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4264 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4265 supports truncating to zero length.
4266 * testsuite/27_io/filesystem/operations/all.cc: New test.
4267 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4269 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4272 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4273 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4274 * config.h.in: Regenerate.
4275 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4276 remaining std::filesystem types and functions.
4277 * configure: Regenerate.
4278 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4279 * src/c++17/Makefile.in: Regenerate.
4280 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4281 here, and change name of included file.
4282 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4283 here, and change name of included file.
4284 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4285 path to dir-common.h.
4286 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4287 path to ops-common.h. Disable -Wunused-parameter warnings.
4288 (internal_file_clock): Define unconditionally.
4289 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4291 (do_copy_file, do_space): Move definitions to ops.common.h.
4292 (copy, file_size, hard_link_count, last_write_time, space): Only
4293 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4295 (last_write_time, read_symlink): Remove unused attributes from
4297 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4298 * src/filesystem/Makefile.in: Regenerate.
4299 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4300 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4301 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4302 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4303 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4304 dummy types and functions instead of using #error.
4305 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4306 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4308 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4309 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4310 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4311 to account for new namespace.
4312 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4313 -lstdc++fs from dg-options.
4314 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4315 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4316 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4317 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4318 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4320 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4321 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4323 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4324 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4325 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4326 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4327 * testsuite/27_io/filesystem/operations/create_directories.cc:
4329 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4330 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4331 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4332 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4333 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4334 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4335 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4336 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4337 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4338 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4339 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4340 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4341 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4342 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4343 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4344 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4345 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4346 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4348 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4352 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4353 typeinfo and vtables less greedy.
4354 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4355 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4356 * src/c++17/Makefile.in: Regenerate.
4357 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4358 here, and change name of included file.
4359 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4360 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4362 * src/filesystem/Makefile.in: Regenerate.
4363 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4364 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4365 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4366 from dg-options and remove dg-require-filesystem-ts.
4367 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4368 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4369 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4370 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4371 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4372 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4373 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4374 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4375 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4376 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4377 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4378 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4379 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4380 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4381 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4382 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4383 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4384 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4385 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4386 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4387 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4389 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4390 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4391 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4392 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4393 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4394 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4395 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4396 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4397 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4398 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4399 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4400 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4402 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4404 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4406 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4408 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4409 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4410 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4411 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4412 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4413 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4414 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4415 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4416 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4417 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4419 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4420 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4421 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4422 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4423 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4426 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4427 Check is_trivially_copyable instead of is_scalar.
4428 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4429 contained value can throw and its type is trivially copyable then
4430 construct into a temporary variant and move from it, to provide the
4431 strong exception safety guarantee.
4432 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4434 * testsuite/20_util/variant/87431.cc: New test.
4435 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4436 conversion causes valueless state.
4439 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4440 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4441 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4442 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4443 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4445 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4447 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4448 (file_time_type): Redefine in terms of __file_clock.
4449 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4451 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4453 (internal_file_lock): New helper type for accessing __file_clock.
4454 (do_copy_file): Use internal_file_lock to convert system time to
4456 (last_write_time(const path&, error_code&)): Likewise.
4457 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4459 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4461 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4462 for const member functions of std::basic_string.
4463 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4465 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4466 Make non-standard constructor private.
4467 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4469 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4470 explicit instantiations for C++17 as well as earlier dialects.
4471 * src/c++17/Makefile.am: Add new source files.
4472 * src/c++17/Makefile.in: Regenerate.
4473 * src/c++17/cow-string-inst.cc: New file defining explicit
4474 instantiations for basic_string member functions added in C++17.
4475 * src/c++17/string-inst.cc: Likewise.
4477 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4478 copy/move constructors for old std::basic_string.
4479 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4480 (basic_string::reference, basic_string::const_reference): Define
4481 as plain references for C++11 and later.
4482 (basic_string::basic_string()): Put constructor body outside
4483 preprocessor conditional groups.
4484 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4485 instead of copying it.
4486 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4488 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4490 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4491 cases for old basic_string.
4492 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4493 allocator-extended constructors unconditionally. Add extra members to
4494 allocator type when using old string ABI.
4495 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4497 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4499 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4500 -fno-inline added to test flags.
4502 * testsuite/21_strings/basic_string/requirements/
4503 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4505 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4506 assertion failures with old std::string ABI.
4508 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4510 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4511 functions that will only erase elements at the end.
4512 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4513 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4514 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4516 (path::_List::pop_back()): Define.
4517 (path::_List::_M_erase_from(const_iterator)): Define.
4518 (path::operator/=(const path&)): Use pop_back to remove last component
4519 and _M_erase_from to remove multiple components.
4520 (path::_M_append(basic_string_view<value_type>)): Likewise.
4521 (path::operator+=(const path&)): Likewise.
4522 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4523 (path::remove_filename()): Likewise.
4524 (path::lexically_normal()): Use _List::_Impl iterators instead of
4525 path::iterator. Use pop_back to remove components from the end. Clear
4526 trailing filename, instead of using erase(const_iterator) to remove
4527 a non-final component.
4528 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4530 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4532 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4533 incorrect treatment of empty filename after trailing slash.
4534 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4536 * testsuite/21_strings/basic_string/modifiers/assign/char/
4537 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4539 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4540 move_assign_optim.cc: Likewise.
4542 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4543 Jakub Jelinek <jakub@redhat.com>
4546 * include/experimental/memory: Replace UTF-8 quote characters.
4547 * include/std/future: Replace UTF-8 "em dash" characters.
4549 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4552 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4553 * include/debug/forward_list: Likewise.
4554 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4556 * include/experimental/chrono: Likewise.
4557 * include/experimental/functional: Likewise.
4558 * include/experimental/ratio: Likewise.
4559 * include/experimental/system_error: Likewise.
4560 * include/experimental/tuple: Likewise.
4561 * include/experimental/type_traits: Likewise.
4562 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4563 * include/parallel/multiseq_selection.h: Likewise.
4566 * config/abi/pre/gnu.ver: Add missing exports.
4567 * testsuite/22_locale/collate_byname/88681.cc: New test.
4568 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4569 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4571 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4573 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4574 initializer_list<value_type> and from input iterator ranges.
4575 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4577 * testsuite/experimental/string_view/element_access/char/empty.cc:
4578 Fix year range in copyright header.
4580 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4582 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4583 Fix year range in copyright header.
4585 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4587 Update copyright years.
4589 Copyright (C) 2019 Free Software Foundation, Inc.
4591 Copying and distribution of this file, with or without modification,
4592 are permitted in any medium without royalty provided the copyright
4593 notice and this notice are preserved.