12019-12-30 Corentin Gay <gay@adacore.com> 2 3 * acinclude.m4 (vxworks*): New entry. Set ac_has_nanosleep=yes. 4 * configure: Regenerate. 5 62019-12-30 Jerome Lambourg <lambourg@adacore.com> 7 Olivier Hainque <hainque@adacore.com> 8 9 * config/os/vxworks/os_defines.h 10 (NOMINMAX): Always redefine to 1. 11 (_NO_CPP_INLINES): Likewise. 12 (_GLIBCXX_USE_WEAK_REF): Define to 1 for RTP on 13 VxWorks >= 7, to 0 otherwise. 14 (_GLIBCXX_HAVE_TLS): Define to 1. 15 For VxWorks >= 7: 16 (_GLIBCXX_USE_C99_MATH): Define to 1. 17 (_GLIBCXX_USE_C99_MATH_FP_MACROS_DYNAMIC): Define to 0. 18 (_HAS_TR1_DECLARATIONS): Redefine to 0. 19 For VxWorks < 7, RTP: 20 (_GLIBCXX_INCLUDE_NEXT_C_HEADERS): Define to 1. 21 (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC): Redefine to 1. 22 (__CORRECT_ISO_CPP11_MATH_H_PROTO_FP): Define. 23 For VxWorks < 7, kernel: #include <vxWorks.h> 24 252019-12-25 Alexandre Oliva <oliva@adacore.com> 26 27 * crossconfig.m4 (GLIBCXX_CROSSCONFIG) [*-vxworks*]: Define 28 long double functions as available if declared by math.h. 29 (GLIBCXX_CHECK_MATH_DECL, GLIBCXX_CHECK_MATH_DECLS): New. 30 * configure: Rebuild. 31 322019-12-20 Jonathan Wakely <jwakely@redhat.com> 33 34 PR libstdc++/92927 35 * include/bits/alloc_traits.h (__alloc_on_copy, __alloc_on_move) 36 (__alloc_on_swap): Add inline specifier. 37 382019-12-20 Jerome Lambourg <lambourg@adacore.com> 39 40 * acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT): Test with AC_LANG_CPLUSPLUS. 41 * configure: Regenerate. 42 432019-12-20 François Dumont <fdumont@gcc.gnu.org> 44 45 * testsuite/23_containers/map/48101_neg.cc: Add versioned namespace 46 pattern to tested error message. 47 * testsuite/23_containers/multimap/48101_neg.cc: Likewise. 48 * testsuite/30_threads/headers/stop_token/synopsis.cc: Add 49 dg-require-normal-namepace. 50 51 * python/libstdcxx/v6/printers.py (lookup_node_type): Remove redundant 52 call to lookup_node_type. 53 * testsuite/libstdc++-prettyprinters/80276.cc: Define 54 _GLIBCXX_USE_CXX11_ABI to 0. 55 * testsuite/libstdc++-prettyprinters/91997.cc: Use regexp-test to check 56 'a' content. 57 582019-12-20 Jerome Lambourg <lambourg@adacore.com> 59 60 * acinclude.m4 (_GLIBCXX_USE_PTHREAD_RWLOCK_T): Checks that _PTHREADS 61 is defined after including gthr.h. 62 * configure: Regenerate. 63 642019-12-12 Jonathan Wakely <jwakely@redhat.com> 65 66 * libsupc++/compare (common_comparison_category): Define without using 67 concepts and optimise for compilation time. 68 (__detail::__cmp_cat_ids): Remove. 69 (__detail::__common_cmp_cat): Replace class template and 70 specializations with constexpr function. 71 722019-12-12 François Dumont <fdumont@gcc.gnu.org> 73 74 * include/tr1/cctype: Add _GLIBCXX_BEGIN_VERSION_NAMESPACE and 75 _GLIBCXX_END_VERSION_NAMESPACE. 76 * include/tr1/cfenv: Likewise. 77 * include/tr1/cinttypes: Likewise. 78 * include/tr1/cstdint: Likewise. 79 * include/tr1/cstdio: Likewise. 80 * include/tr1/cstdlib: Likewise. 81 * include/tr1/cwchar: Likewise. 82 * include/tr1/cwctype: Likewise. 83 84 * src/c++11/random.cc: Include <cctype>. 85 (random_devise::_M_init_pretr1): Qualify isdigit call. 86 872019-12-10 Thomas Rodgers <trodgers@redhat.com> 88 89 * include/pstl/glue_numeric_defs.h: Restore enable_if lost during 90 original import of pstl. 91 * include/pstl/glue_numeric_impl.h: Likewise. 92 932019-12-10 Jonathan Wakely <jwakely@redhat.com> 94 95 (span(ContiguousIterator, Sentinel)): Add conditional noexcept. 96 * include/std/span (span(ContiguousIterator, size_type)): Change 97 noexcept to be unconditionally true. 98 * testsuite/23_containers/span/nothrow_cons.cc: New test. 99 1002019-12-10 François Dumont <fdumont@gcc.gnu.org> 101 102 * include/bits/stl_algobase.h 103 (__copy_move_a1<>(_II, _II, _OI)): New. 104 (__copy_move_a1<>(_Deque_iterator<>, _Deque_iterator<>, _OI)): New. 105 (__copy_move_a1<>(_Deque_iterator<>, _Deque_iterator<>, 106 _Deque_iterator<>)): New. 107 (__copy_move_a1<>(_II, _II, _Deque_iterator<>)): New. 108 (__copy_move_a<>(_II, _II, _OI)): Adapt, call __copy_move_a1<>. 109 (__copy_move_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&, 110 _OI)): New. 111 (__copy_move_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&, 112 const _Safe_iterator<>&)): New. 113 (__copy_move_a<>(_II, _II, const _Safe_iterator<>&)): New. 114 (copy, move): Adapt, call __copy_move_a. 115 (__copy_move_backward_a1<>(_II, _II, _OI)): New, 116 call __copy_move_backward_a2. 117 (__copy_move_backward_a1<>(_Deque_iterator<>, _Deque_iterator<>, _OI)): New. 118 (__copy_move_backward_a1<>(_Deque_iterator<>, _Deque_iterator<>, 119 _Deque_iterator<>)): New. 120 (__copy_move_backward_a1<>(_II, _II, _Deque_iterator<>)): New. 121 (__copy_move_backward_a<>(_II, _II, _OI)): Adapt, call 122 __copy_move_backward_a1<>. 123 (__copy_move_backward_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&, 124 _OI)): New. 125 (__copy_move_backward_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&, 126 const _Safe_iterator<>&)): New. 127 (__copy_move_backward_a<>(_II, _II, const _Safe_iterator<>&)): New. 128 (copy_backward, move_backward): Adapt, call __copy_move_backward_a<>. 129 (__fill_a): Rename into... 130 (__fill_a1): ... this. 131 (__fill_a1(__normal_iterator<>, __normal_iterator<>, const _Tp&)): New. 132 (__fill_a1(const _Deque_iterator<>&, const _Deque_iterator<>&, _VTp)): 133 New. 134 (__fill_a(_FIte, _FIte, const _Tp&)): New, call __fill_a1. 135 (__fill_a(const _Safe_iterator<>&, const _Safe_iterator<>&, 136 const _Tp&)): New. 137 (fill): Adapt, remove __niter_base usage. 138 (__fill_n_a): Rename into... 139 (__fill_n_a1): ...this. 140 (__fill_n_a(const _Safe_iterator<>&, _Size, const _Tp&, 141 input_iterator_tag)): New. 142 (__fill_n_a(_OI, _Size, const _Tp&, output_iterator_tag)): New, call 143 __fill_n_a1. 144 (__fill_n_a(_OI, _Size, const _Tp&, random_access_iterator_tag)): New, 145 call __fill_a. 146 (__equal_aux): Rename into... 147 (__equal_aux1): ...this. 148 (__equal_aux1(_Deque_iterator<>, _Deque_iterator<>, _OI)): New. 149 (__equal_aux1(_Deque_iterator<>, _Deque_iterator<>, 150 _Deque_iterator<>)): New. 151 (__equal_aux1(_II, _II, _Deque_iterator<>)): New. 152 (__equal_aux(_II1, _II1, _II2)): New, call __equal_aux1. 153 (__equal_aux(const _Safe_iterator<>&, const _Safe_iterator<>&, 154 _OI)): New. 155 (__equal_aux(const _Safe_iterator<>&, const _Safe_iterator<>&, 156 const _Safe_iterator<>&)): New. 157 (__equal_aux(_II, _II, const _Safe_iterator<>&)): New. 158 (equal(_II1, _II1, _II2)): Adapt. 159 * include/bits/stl_deque.h 160 (fill, copy, copy_backward, move, move_backward): Remove. 161 * include/bits/deque.tcc: Include <bits/stl_algobase.h>. 162 (__fill_a1): New. 163 (__copy_move_dit): New. 164 (__copy_move_a1): New, use latter. 165 (__copy_move_a1(_II, _II, _Deque_iterator<>)): New. 166 (__copy_move_backward_dit): New. 167 (__copy_move_backward_a1): New, use latter. 168 (__copy_move_backward_a1(_II, _II, _Deque_iterator<>)): New. 169 (__equal_dit): New. 170 (__equal_aux1): New, use latter. 171 (__equal_aux1(_II, _II, _Deque_iterator<>)): New. 172 * include/std/numeric (__is_random_access_iter): Move... 173 * include/bits/stl_iterator_base_types.h (__is_random_access_iter): ... 174 here. Provide pre-C++11 definition. 175 * include/debug/debug.h (_Safe_iterator<>): New declaration. 176 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_can_advance): Add 177 __strict parameter. 178 * include/debug/safe_iterator.tcc: Include <bits/stl_algobase.h>. 179 (_Safe_iterator<>::_M_can_advance): Adapt. 180 (std::__copy_move_a, std::__copy_move_backward_a, __fill_a): New. 181 (__fill_n_a, __equal_aux): New. 182 * include/debug/stl_iterator.h (__niter_base): Remove. 183 * include/debug/vector (__niter_base): Remove. 184 * testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc: 185 Include <vector> and <list>. Add benches. 186 * testsuite/performance/25_algorithms/copy_deque_iterators.cc: Likewise. 187 * testsuite/performance/25_algorithms/equal_deque_iterators.cc: Likewise. 188 * testsuite/25_algorithms/copy/debug/1_neg.cc: New. 189 * testsuite/25_algorithms/copy/deque_iterators/2.cc: New. 190 * testsuite/25_algorithms/copy/deque_iterators/31.cc: New. 191 * testsuite/25_algorithms/copy/deque_iterators/32.cc: New. 192 * testsuite/25_algorithms/copy/deque_iterators/33.cc: New. 193 * testsuite/25_algorithms/copy/deque_iterators/41.cc: New. 194 * testsuite/25_algorithms/copy/deque_iterators/42.cc: New. 195 * testsuite/25_algorithms/copy/deque_iterators/43.cc: New. 196 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc (test02): 197 New. 198 * testsuite/25_algorithms/copy_backward/deque_iterators/2.cc: New. 199 * testsuite/25_algorithms/equal/deque_iterators/1.cc: New. 200 * testsuite/25_algorithms/fill/deque_iterators/1.cc: New. 201 * testsuite/25_algorithms/move/deque_iterators/2.cc: New. 202 * testsuite/25_algorithms/move_backward/deque_iterators/2.cc: New. 203 2042019-12-10 Jonathan Wakely <jwakely@redhat.com> 205 206 PR libstdc++/92886 207 * include/bits/ios_base.h (std::ios_base::trunc): Fix comment. 208 209 * include/std/complex (__cpp_lib_constexpr_complex): Define. 210 * include/std/version (__cpp_lib_constexpr_complex): Likewise. 211 * testsuite/26_numerics/complex/1.cc: New test. 212 * testsuite/26_numerics/complex/2.cc: New test. 213 214 * include/std/span: Do not include <tuple> and <utility>. 215 (tuple_size, tuple_element): Declare. 216 217 * include/bits/iterator_concepts.h (indirect_result_t): Do not apply 218 iter_reference_t to parameter pack. 219 * testsuite/24_iterators/indirect_callable/projected.cc: New test. 220 2212019-12-09 Jonathan Wakely <jwakely@redhat.com> 222 223 * include/bits/range_access.h (ranges::enable_safe_range): Define. 224 (ranges::begin, ranges::end, ranges::rbegin, ranges::rend): Constrain 225 to only accept types satisfying safe_range and treat argument as an 226 lvalue when calling a member of performing ADL. 227 (ranges::__detail::__range_impl, ranges::__detail::__forwarding_range): 228 Remove. 229 (ranges::range): Adjust definition. 230 (ranges::safe_range): Define. 231 (ranges::iterator_t, ranges::range_difference_t): Reorder definitions 232 to match the synopsis in the working draft. 233 (ranges::disable_sized_range): Remove duplicate definition. 234 * include/experimental/string_view (ranges::enable_safe_range): Add 235 partial specialization for std::experimental::basic_string_view. 236 * include/std/ranges (ranges::viewable_range, ranges::subrange) 237 (ranges::empty_view, ranges::iota_view): Use safe_range. Specialize 238 enable_safe_range. 239 (ranges::safe_iterator_t, ranges::safe_subrange_t): Define. 240 * include/std/span (ranges::enable_safe_range): Add partial 241 specialization for std::span. 242 * include/std/string_view (ranges::enable_safe_range): Likewise for 243 std::basic_string_view. 244 * testsuite/std/ranges/access/begin.cc: Adjust expected results. 245 * testsuite/std/ranges/access/cbegin.cc: Likewise. 246 * testsuite/std/ranges/access/cdata.cc: Likewise. 247 * testsuite/std/ranges/access/cend.cc: Likewise. 248 * testsuite/std/ranges/access/crbegin.cc: Likewise. 249 * testsuite/std/ranges/access/crend.cc: Likewise. 250 * testsuite/std/ranges/access/data.cc: Likewise. 251 * testsuite/std/ranges/access/end.cc: Likewise. 252 * testsuite/std/ranges/access/rbegin.cc: Likewise. 253 * testsuite/std/ranges/access/rend.cc: Likewise. 254 * testsuite/std/ranges/empty_view.cc: Test ranges::begin and 255 ranges::end instead of unqualified calls to begin and end. 256 * testsuite/std/ranges/safe_range.cc: New test. 257 * testsuite/std/ranges/safe_range_types.cc: New test. 258 * testsuite/util/testsuite_iterators.h: Add comment about safe_range. 259 260 * testsuite/27_io/filesystem/path/concat/strings.cc: Test more cases. 261 262 PR libstdc++/92853 263 * src/c++17/fs_path.cc (filesystem::path::operator+=(const path&)): 264 Do not process a trailing directory separator twice. 265 * testsuite/27_io/filesystem/path/concat/92853.cc: New test. 266 * testsuite/27_io/filesystem/path/concat/path.cc: Test more cases. 267 2682019-12-09 François Dumont <fdumont@gcc.gnu.org> 269 270 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: 271 Fix static_assert line number. 272 * testsuite/23_containers/array/tuple_interface/ 273 tuple_element_debug_neg.cc: Likewise. 274 2752019-12-07 Andrew Pinski <apinski@marvell.com> 276 277 * config/cpu/aarch64/opt/ext/opt_random.h: Wrap around with check 278 for little-endian like ext/random is done. 279 2802019-12-05 Jonathan Wakely <jwakely@redhat.com> 281 282 * testsuite/23_containers/span/lwg3255.cc: Fix test. Constructing a 283 span of non-const elements should not be possible from a const array 284 or an array of const elements. 285 2862019-12-05 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com> 287 288 Implement P1872R0 and P1394R0 for std::span 289 * include/bits/range_access.h (__adl_begin, __adl_end): Remove. 290 (sentinel_t, range_value_t, range_reference_t) 291 (range_rvalue_reference_t, __forwarding_range, disable_sized_range) 292 (output_range, input_range, forward_range, bidirectional_range) 293 (random_access_range, contiguous_range, common_range): Move here from 294 <ranges>, to make this the "ranges lite" internal header. 295 * include/std/ranges: Move basic aliases and concepts to 296 <bits/range_access.h>. 297 * include/std/span: Use concepts and ranges:: calls instead of 298 enable_if and friends. 299 * include/std/type_traits: Add __is_array_convertible trait. 300 3012019-12-05 Jonathan Wakely <jwakely@redhat.com> 302 303 * include/bits/stl_algobase.h (lexicographical_compare_three_way): 304 Define for C++20. 305 * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc: New 306 test. 307 * testsuite/25_algorithms/lexicographical_compare_three_way/ 308 constexpr.cc: New test. 309 310 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter): New printer. 311 * testsuite/libstdc++-prettyprinters/cxx20.cc: New test. 312 313 * include/bits/cpp_type_traits.h (__is_byte<char8_t>): Add 314 specialization. 315 * include/std/array (operator<=>): Likewise. 316 * testsuite/23_containers/array/comparison_operators/constexpr.cc: 317 Test three-way comparisons and arrays of unsigned char. 318 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust 319 dg-error line numbers. 320 3212019-12-03 Jonathan Wakely <jwakely@redhat.com> 322 323 * include/bits/stl_pair.h [__cpp_lib_three_way_comparison] 324 (operator<=>): Define for C++20. 325 * libsupc++/compare (__cmp2way_res_t): Rename to __cmp3way_res_t, 326 move into __detail namespace. Do not turn argument types into lvalues. 327 (__cmp3way_helper): Rename to __cmp3way_res_impl, move into __detail 328 namespace. Constrain with concepts instead of using void_t. 329 (compare_three_way_result): Adjust name of base class. 330 (compare_three_way_result_t): Use __cmp3way_res_impl directly. 331 (__detail::__3way_cmp_with): Add workaround for PR 91073. 332 (compare_three_way): Use workaround. 333 (__detail::__synth3way, __detail::__synth3way_t): Define new helpers 334 implementing synth-three-way and synth-three-way-result semantics. 335 * testsuite/20_util/pair/comparison_operators/constexpr_c++20.cc: New 336 test. 337 338 * include/bits/stl_pair.h (pair): Remove stray Doxygen closing marker. 339 340 * testsuite/util/slow_clock.h: Fix copyright date. 341 3422019-12-02 Mike Crowe <mac@mcrowe.com> 343 344 Fix try_lock_until and try_lock_shared_until on arbitrary clock 345 * include/std/shared_mutex (shared_timed_mutex::try_lock_until) 346 (shared_timed_mutex::try_lock_shared_until): Loop until the absolute 347 timeout time is reached as measured against the appropriate clock. 348 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New 349 file. Test try_lock_until and try_lock_shared_until timeouts against 350 various clocks. 351 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New 352 file. Test try_lock_until and try_lock_shared_until timeouts against 353 various clocks. 354 355 Add full steady_clock support to shared_timed_mutex 356 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_RWLOCK_CLOCKLOCK): Define 357 to check for the presence of both pthread_rwlock_clockrdlock and 358 pthread_rwlock_clockwrlock. 359 * config.h.in: Regenerate. 360 * configure.ac: Call GLIBCXX_USE_PTHREAD_RWLOCK_CLOCKLOCK. 361 * configure: Regenerate. 362 * include/std/shared_mutex (shared_timed_mutex): Define __clock_t as 363 the best clock to use for relative waits. 364 (shared_timed_mutex::try_lock_for) Round up wait duration if necessary. 365 (shared_timed_mutex::try_lock_shared_for): Likewise. 366 (shared_timed_mutex::try_lock_until): Use existing try_lock_until 367 implementation for system_clock (which matches __clock_t when 368 _GLIBCCXX_USE_PTHREAD_RWLOCK_CLOCKLOCK is not defined). Add new 369 overload for steady_clock that uses pthread_rwlock_clockwrlock if it 370 is available. Simplify overload for non-standard clock to just call 371 try_lock_for with a relative timeout. 372 (shared_timed_mutex::try_lock_shared_until): Likewise. 373 374 PR libstdc++/91906 Fix timed_mutex::try_lock_until on arbitrary clock 375 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Loop 376 until the absolute timeout time is reached as measured against the 377 appropriate clock. 378 * testsuite/util/slow_clock.h: New file. Move implementation of 379 slow_clock test class. 380 * testsuite/30_threads/condition_variable/members/2.cc: Include 381 slow_clock from header. 382 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Convert 383 existing test to templated function so that it can be called with 384 both system_clock and steady_clock. 385 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Also run test 386 using slow_clock to test above fix. 387 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc: 388 Likewise. 389 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/4.cc: Add 390 new test that try_lock_until behaves as try_lock if the timeout has 391 already expired or exactly matches the current time. 392 393 PR libstdc++/78237 Add full steady_clock support to timed_mutex 394 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_MUTEX_CLOCKLOCK): Define to 395 detect presence of pthread_mutex_clocklock function. 396 * config.h.in: Regenerate. 397 * configure: Regenerate. 398 * configure.ac: Call GLIBCXX_CHECK_PTHREAD_MUTEX_CLOCKLOCK. 399 * include/std/mutex (__timed_mutex_impl): Remove unnecessary __clock_t. 400 (__timed_mutex_impl::_M_try_lock_for): Use best clock to turn relative 401 timeout into absolute timeout. 402 (__timed_mutex_impl::_M_try_lock_until): Keep existing implementation 403 for system_clock. Add new implementation for steady_clock that calls 404 _M_clocklock. Modify overload for user-defined clock to use a relative 405 wait so that it automatically uses the best clock. 406 [_GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK] (timed_mutex::_M_clocklock): 407 New member function. 408 (recursive_timed_mutex::_M_clocklock): Likewise. 409 410 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc: 411 New test. Ensure that timed_mutex::try_lock_until actually times out 412 after the specified time when using both system_clock and 413 steady_clock. 414 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: New test. 415 Likewise but for recursive_timed_mutex. 416 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Template 417 test functions and use them to test both steady_clock and system_clock. 418 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. Wrap call 419 to timed_mutex::try_lock_until in VERIFY macro to check its return 420 value. 421 4222019-11-30 Jonathan Wakely <jwakely@redhat.com> 423 424 * acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Enable by default for 425 mingw targets. 426 * configure: Regenerate. 427 428 * include/bits/fs_path.h (u8path(InputIterator, InputIterator)) 429 (u8path(const Source&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Simplify 430 conditions. 431 * include/experimental/bits/fs_path.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS] 432 (__u8path(const Source&, char)): Add overloads for std::string and 433 types convertible to std::string. 434 (_Cvt::_S_wconvert): Add a new overload for char8_t strings and use 435 codecvt_utf8_utf16 to do the correct conversion. 436 4372019-11-29 Jonathan Wakely <jwakely@redhat.com> 438 439 * include/bits/fs_path.h (path::operator/=): Change template-head to 440 use typename instead of class. 441 * include/experimental/bits/fs_path.h (path::operator/=): Likewise. 442 * include/std/ostream (operator<<): Likewise. 443 4442019-11-29 Tom Honermann <tom@honermann.net> 445 446 New tests 447 * testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc: 448 New test to validate deleted overloads of character and string 449 inserters for narrow ostreams. 450 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/deleted.cc: 451 New test to validate deleted overloads of character and string 452 inserters for wide ostreams. 453 * testsuite/27_io/filesystem/path/factory/u8path-char8_t.cc: New test 454 to validate u8path invocations with sequences of char8_t. 455 * testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc: 456 New test to validate u8path invocations with sequences of char8_t. 457 458 Updates to existing tests 459 * testsuite/experimental/feat-char8_t.cc: Updated the expected 460 __cpp_lib_char8_t feature test macro value. 461 * testsuite/27_io/filesystem/path/factory/u8path.cc: Added testing of 462 u8path invocation with std::string, std::string_view, and iterators 463 thereof. 464 * testsuite/experimental/filesystem/path/factory/u8path.cc: Added 465 testing of u8path invocation with std::string, std::string_view, and 466 iterators thereof. 467 468 Update feature test macro, add deleted operators, update u8path 469 * include/bits/c++config: Bumped the value of the __cpp_lib_char8_t 470 feature test macro. 471 * include/bits/fs_path.h (u8path): Modified u8path to accept sequences 472 of char8_t. 473 * include/experimental/bits/fs_path.h (u8path): Modified u8path to 474 accept sequences of char8_t. 475 * include/std/ostream: Added deleted overloads of wchar_t, char8_t, 476 char16_t, and char32_t for ordinary and wide formatted character and 477 string inserters. 478 479 Decouple constraints for u8path from path constructors 480 * include/bits/fs_path.h: Moved helper utilities out of 481 std::filesystem::path into a detail namespace to make them 482 available for use by u8path. 483 * include/experimental/bits/fs_path.h: Moved helper utilities out 484 of std::experimental::filesystem::v1::path into a detail 485 namespace to make them available for use by u8path. 486 4872019-11-29 Jonathan Wakely <jwakely@redhat.com> 488 489 PR libstdc++/91997 490 * python/libstdcxx/v6/printers.py (find_type): Fail more gracefully 491 if we run out of base classes to look at. 492 (lookup_templ_spec, lookup_node_type): New utilities to find node 493 types for node-based containers. 494 (StdListPrinter.children, NodeIteratorPrinter.__init__) 495 (NodeIteratorPrinter.to_string, StdSlistPrinter.children) 496 (StdSlistIteratorPrinter.to_string, StdRbtreeIteratorPrinter.__init__) 497 (StdMapPrinter.children, StdSetPrinter.children) 498 (StdForwardListPrinter.children): Use lookup_node_type instead of 499 find_type. 500 (StdListIteratorPrinter.__init__, StdFwdListIteratorPrinter.__init__): 501 Pass name of node type to NodeIteratorPrinter constructor. 502 (Tr1HashtableIterator.__init__): Rename argument. 503 (StdHashtableIterator.__init__): Likewise. Use lookup_templ_spec 504 instead of find_type. 505 * testsuite/libstdc++-prettyprinters/59161.cc: Remove workaround for 506 _Node typedef not being present in debuginfo. 507 * testsuite/libstdc++-prettyprinters/91997.cc: New test. 508 5092019-11-26 François Dumont <fdumont@gcc.gnu.org> 510 511 * include/debug/helper_functions.h (__valid_range_aux): Use C++98 512 std::input_iterator_tag default constructor invocation. 513 514 * include/debug/array (array<>::fill): Add C++20 constexpr. 515 (array<>::swap): Likewise. 516 517 * include/debug/safe_iterator.h 518 [__cpp_lib_concepts](_Safe_iterator<>::iterator_concept): Define for 519 C++20. 520 5212019-11-25 Jonathan Wakely <jwakely@redhat.com> 522 523 * include/bits/iterator_concepts.h (ranges::iter_swap): Fix parameter 524 types of poison pill overload. Use remove_reference_t when checking 525 constraints. 526 * include/bits/stl_iterator.h (move_sentinel): Define for C++20. 527 (move_iterator): Adjust definitions of nested types for C++20. Add 528 hidden friends for move_sentinel operations, iter_move and iter_swap. 529 (common_iterator, counted_iterator): Define for C++20. 530 * testsuite/24_iterators/move_iterator/cust.cc: New test. 531 * testsuite/24_iterators/move_iterator/sentinel.cc: New test. 532 * testsuite/24_iterators/common_iterator/1.cc: New test. 533 * testsuite/24_iterators/counted_iterator/1.cc: New test. 534 535 PR libstdc++/91786 536 * include/bits/fs_path.h (filesystem_error): Move definition before 537 the use in u8path. 538 5392019-11-24 François Dumont <fdumont@gcc.gnu.org> 540 541 * include/debug/functions.h: Remove <bits/move.h> include. 542 (__check_singular_aux, __check_singular): Move... 543 * include/debug/helper_functions.h: 544 (__check_singular_aux, __check_singular): ...here. 545 (__valid_range_aux): Adapt to use latter. 546 * testsuite/25_algorithms/copy/debug/2_neg.cc: New. 547 5482019-11-20 Janne Blomqvist <jb@gcc.gnu.org> 549 550 * doc/html/api.html: Use https for gcc.gnu.org. 551 * doc/xml/api.xml: Likewise. 552 5532019-11-19 Jonathan Wakely <jwakely@redhat.com> 554 555 * include/bits/regex.h (ranges::__detail::__enable_view_impl): Fix 556 declaration. 557 * include/bits/stl_multiset.h (ranges::__detail::__enable_view_impl): 558 Likewise. 559 * include/bits/stl_set.h (ranges::__detail::__enable_view_impl): 560 Likewise. 561 * include/bits/unordered_set.h (ranges::__detail::__enable_view_impl): 562 Likewise. 563 * include/debug/multiset.h (ranges::__detail::__enable_view_impl): 564 Likewise. 565 * include/debug/set.h (ranges::__detail::__enable_view_impl): Likewise. 566 * include/debug/unordered_set (ranges::__detail::__enable_view_impl): 567 Likewise. 568 5692019-11-18 Jonathan Wakely <jwakely@redhat.com> 570 571 * include/std/thread: Reduce header dependencies. 572 (jthread::get_id()): Add missing return. 573 (jthread::get_stop_token()): Avoid unnecessary stop_source temporary. 574 (jthread::_S_create): Check is_invocable using decayed types. Add 575 static assertion. 576 * testsuite/30_threads/jthread/1.cc: Add dg-require-gthreads. 577 * testsuite/30_threads/jthread/2.cc: Likewise. 578 * testsuite/30_threads/jthread/3.cc: New test. 579 * testsuite/30_threads/jthread/jthread.cc: Add missing directives for 580 pthread and gthread support. Use VERIFY instead of assert. 581 582 * include/bits/alloc_traits.h (allocator_traits::construct) 583 (allocator_traits::destroy, allocator_traits::max_size): Add unused 584 attributes to parameters that are not used in C++20. 585 * include/std/bit (__ceil2): Add braces around assertion to avoid 586 -Wmissing-braces warning. 587 5882019-11-16 Edward Smith-Rowland <3dw4rd@verizon.net> 589 590 Repair the <tuple> part of C++20 p1032 Misc constexpr bits. 591 * include/bits/uses_allocator.h (__uses_alloc0::_Sink::operaror=) 592 (__use_alloc(const _Alloc&)) : Constexpr. 593 5942019-11-17 Jonathan Wakely <jwakely@redhat.com> 595 596 * include/std/string_view (basic_string_view(It, End)): Add range 597 constructor and deduction guide from P1391R4. 598 * testsuite/21_strings/basic_string_view/cons/char/range.cc: New test. 599 600 * include/bits/regex.h (match_results): Specialize __enable_view_impl. 601 * include/bits/stl_set.h (set): Likewise. 602 * include/bits/unordered_set.h (unordered_set, unordered_multiset): 603 Likewise. 604 * include/debug/multiset.h (__debug::multiset): Likewise. 605 * include/debug/set.h (__debug::set): Likewise. 606 * include/debug/unordered_set (__debug::unordered_set) 607 (__debug::unordered_multiset): Likewise. 608 * include/std/ranges (ranges::view, ranges::enable_view) 609 (ranges::view_interface, ranges::subrange, ranges::empty_view) 610 (ranges::single_view, ranges::views::single, ranges::iota_view) 611 (ranges::views::iota): Define for C++20. 612 * testsuite/std/ranges/empty_view.cc: New test. 613 * testsuite/std/ranges/iota_view.cc: New test. 614 * testsuite/std/ranges/single_view.cc: New test. 615 * testsuite/std/ranges/view.cc: New test. 616 6172019-11-16 Jonathan Wakely <jwakely@redhat.com> 618 619 * include/std/ranges: Revert accidentally committed changes. 620 621 * include/std/thread (jthread::jthread()): Use nostopstate constant. 622 (jthread::jthread(Callable&&, Args&&...)): Use helper function to 623 create std::thread instead of indirection through a lambda. Use 624 remove_cvref_t instead of decay_t. 625 (jthread::joinable(), jthread::get_id(), jthread::native_handle()) 626 (jthread::hardware_concurrency()): Add nodiscard attribute. 627 (swap(jthread&. jthread&)): Define hidden friend. 628 (jthread::_S_create): New helper function for constructor. 629 6302019-11-15 Edward Smith-Rowland <3dw4rd@verizon.net> 631 632 Implement the <tuple> part of C++20 p1032 Misc constexpr bits. 633 * include/std/tuple (_Head_base, _Tuple_impl(allocator_arg_t,...) 634 (_M_assign, tuple(allocator_arg_t,...), _Inherited, operator=, _M_swap) 635 (swap, pair(piecewise_construct_t,): Constexpr. 636 * (__uses_alloc0::_Sink::operator=, __uses_alloc_t): Constexpr. 637 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: New test. 638 * testsuite/20_util/tuple/constexpr_swap.cc : New test. 639 * testsuite/20_util/uses_allocator/69293_neg.cc: Extra error for C++20. 640 * testsuite/20_util/uses_allocator/cons_neg.cc: : Extra error for C++20. 641 6422019-11-15 Jonathan Wakely <jwakely@redhat.com> 643 644 * include/std/stop_token: Reduce header dependencies by including 645 internal headers. 646 (stop_token::swap(stop_token&), swap(stop_token&, stop_token&)): 647 Define. 648 (operator!=(const stop_token&, const stop_token&)): Fix return value. 649 (stop_token::_Stop_cb::_Stop_cb(Cb&&)): Use std::forward instead of 650 (stop_token::_Stop_state_t) [_GLIBCXX_HAS_GTHREADS]: Use lock_guard 651 instead of unique_lock. 652 [!_GLIBCXX_HAS_GTHREADS]: Do not use mutex. 653 (stop_token::stop_token(_Stop_state)): Change parameter to lvalue 654 reference. 655 (stop_source): Remove unnecessary using-declarations for names only 656 used once. 657 (swap(stop_source&, stop_source&)): Define. 658 (stop_callback(const stop_token&, _Cb&&)) 659 (stop_callback(stop_token&&, _Cb&&)): Replace lambdas with a named 660 function. Use std::forward instead of std::move. Run callbacks if a 661 stop request has already been made. 662 (stop_source::_M_execute()): Remove. 663 (stop_source::_S_execute(_Stop_cb*)): Define. 664 * include/std/version (__cpp_lib_jthread): Define conditionally. 665 * testsuite/30_threads/stop_token/stop_callback.cc: New test. 666 * testsuite/30_threads/stop_token/stop_source.cc: New test. 667 * testsuite/30_threads/stop_token/stop_token.cc: Enable test for 668 immediate execution of callback. 669 6702019-11-15 Edward Smith-Rowland <3dw4rd@verizon.net> 671 672 Implement the default_searcher part of C++20 p1032 Misc constexpr bits. 673 * include/std/functional 674 (default_searcher, default_searcher::operator()): Constexpr. 675 * testsuite/20_util/function_objects/constexpr_searcher.cc: New. 676 6772019-11-15 Jonathan Wakely <jwakely@redhat.com> 678 679 * include/bits/iterator_concepts.h (weakly_incrementable): Adjust. 680 * include/std/concepts (default_constructible): Rename to 681 default_initializable and require default-list-initialization and 682 default-initialization to be valid (LWG 3149). 683 (semiregular): Adjust to new name. 684 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/ 685 1.cc: Rename directory to concept.defaultinitializable and adjust to 686 new name. 687 * testsuite/std/concepts/concepts.lang/concept.defaultinitializable/ 688 lwg3149.cc: New test. 689 * testsuite/util/testsuite_iterators.h (test_range): Adjust. 690 691 * src/c++17/fs_path.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS] 692 (is_disk_designator): New helper function. 693 (path::_Parser::root_path()): Use is_disk_designator. 694 (path::lexically_relative(const path&)): Implement resolution of 695 LWG 3070. 696 * testsuite/27_io/filesystem/path/generation/relative.cc: Check with 697 path components that look like a root-name. 698 699 * doc/doxygen/user.cfg.in: Add <stop_token>. 700 * include/precompiled/stdc++.h: Likewise. 701 * include/std/stop_token: Fix definition of std::nostopstate. 702 * testsuite/30_threads/headers/stop_token/synopsis.cc: New test. 703 * testsuite/30_threads/headers/thread/types_std_c++20.cc: New test. 704 * testsuite/30_threads/stop_token/stop_source.cc: New test. 705 * testsuite/30_threads/stop_token/stop_token.cc: Remove unnecessary 706 dg-require directives. Remove I/O and inclusion of <iostream>. 707 7082019-11-14 Thomas Rodgers <trodgers@redhat.com> 709 710 * include/Makefile.am: Add <stop_token> header. 711 * include/Makefile.in: Regenerate. 712 * include/std/condition_variable: Add overloads for stop_token support 713 to condition_variable_any. 714 * include/std/stop_token: New file. 715 * include/std/thread: Add jthread type. 716 * include/std/version (__cpp_lib_jthread): New value. 717 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: New test. 718 * testsuite/30_threads/condition_variable_any/stop_token/2.cc: New test. 719 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc: 720 New test. 721 * testsuite/30_threads/jthread/1.cc: New test. 722 * testsuite/30_threads/jthread/2.cc: New test. 723 * testsuite/30_threads/jthread/jthread.cc: New test. 724 * testsuite/30_threads/stop_token/1.cc: New test. 725 * testsuite/30_threads/stop_token/2.cc: New test. 726 * testsuite/30_threads/stop_token/stop_token.cc: New test. 727 7282019-11-14 Edward Smith-Rowland <3dw4rd@verizon.net> 729 730 Implement the <array> part of C++20 p1032 Misc constexpr bits. 731 * include/std/array (fill, swap): Make constexpr. 732 * testsuite/23_containers/array/requirements/constexpr_fill.cc: New. 733 * testsuite/23_containers/array/requirements/constexpr_swap.cc: New. 734 7352019-11-14 Jonathan Wakely <jwakely@redhat.com> 736 737 * include/bits/iterator_concepts.h (__iter_concept_impl): Add 738 comments. 739 (indirect_relation): Rename to indirect_binary_predicate and adjust 740 definition as per P1716R3. 741 (indirect_equivalence_relation): Define. 742 (indirectly_comparable): Adjust definition. 743 * include/std/concepts (equivalence_relation): Define. 744 * testsuite/std/concepts/concepts.callable/relation.cc: Add tests for 745 equivalence_relation. 746 747 * include/bits/iterator_concepts.h (disable_sized_sentinel): Rename to 748 disable_sized_sentinel_for. 749 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust. 750 7512019-11-13 Jonathan Wakely <jwakely@redhat.com> 752 753 * libsupc++/compare (strong_order, weak_order, partial_order) 754 (compare_strong_order_fallback, compare_weak_order_fallback) 755 (compare_partial_order_fallback): Define customization point objects 756 for C++20. 757 * testsuite/18_support/comparisons/algorithms/partial_order.cc: New 758 test. 759 * testsuite/18_support/comparisons/algorithms/strong_order.cc: New 760 test. 761 * testsuite/18_support/comparisons/algorithms/weak_order.cc: New test. 762 7632019-11-11 Gerald Pfeifer <gerald@pfeifer.com> 764 765 * doc/xml/gnu/gpl-3.0.xml: Adjust link to "Why not LGPL". 766 7672019-11-10 Gerald Pfeifer <gerald@pfeifer.com> 768 769 * doc/xml/manual/using.xml: Switch www.hboehm.info to https. 770 7712019-11-07 Jonathan Wakely <jwakely@redhat.com> 772 773 * doc/doxygen/user.cfg.in (INPUT): Add <compare> header. 774 * include/precompiled/stdc++.h: Include <compare> header. 775 776 * libsupc++/compare (common_comparison_category) 777 (common_comparison_category_t): Define for C++20. 778 * testsuite/18_support/comparisons/common/1.cc: New test. 779 780 * include/bits/stl_algo.h (for_each_n): Handle negative count. 781 * testsuite/25_algorithms/for_each/for_each_n_debug.cc: New test. 782 7832019-11-07 Jason Merrill <jason@redhat.com> 784 785 * libsupc++/compare: Remove strong_equality and weak_equality. 786 7872019-11-06 Jonathan Wakely <jwakely@redhat.com> 788 789 * include/Makefile.in: Regenerate. 790 * libsupc++/Makefile.in: Regenerate. 791 * libsupc++/compare (__3way_builtin_ptr_cmp): Define helper. 792 (compare_three_way): Add missing implementation. 793 794 * include/bits/iterator_concepts.h (unreachable_sentinel_t): Remove 795 redundant equality operators. 796 * testsuite/util/testsuite_iterators.h (test_range::sentinel): 797 Likewise. 798 7992019-11-05 Jonathan Wakely <jwakely@redhat.com> 800 801 * libsupc++/compare: New header. 802 * libsupc++/Makefile.am (std_HEADERS): Add compare. 803 * include/std/version: Define __cpp_lib_three_way_comparison. 804 * include/std/functional: #include <compare>. 805 806 * include/std/version [!_GLIBCXX_HOSTED]: Do not define feature test 807 macros for features that are only present in hosted builds. 808 809 * include/bits/iterator_concepts.h (__iter_without_nested_types): 810 Remove incorrect comment. 811 8122019-10-31 Jonathan Wakely <jwakely@redhat.com> 813 814 * doc/html/*: Regenerate. 815 816 * include/bits/refwrap.h (reference_wrapper, ref, cref): Add constexpr 817 specifiers for C++20. 818 * include/std/functional (_Mem_fn, mem_fn, _Bind, _Bind_result, bind) 819 (bind_front, _Not_fn, not_fn): Likewise. 820 * testsuite/20_util/bind/constexpr.cc: New test. 821 * testsuite/20_util/function_objects/bind_front/constexpr.cc: New test. 822 * testsuite/20_util/function_objects/mem_fn/constexpr.cc: New test. 823 * testsuite/20_util/function_objects/not_fn/constexpr.cc: New test. 824 * testsuite/20_util/reference_wrapper/constexpr.cc: New test. 825 826 * doc/doxygen/user.cfg.in: Add new header. 827 * include/Makefile.am: Add new header. 828 * include/Makefile.in: Regenerate. 829 * include/precompiled/stdc++.h: Include new header. 830 * include/std/ranges: New header. 831 (ranges::sentinel_t, ranges::range_value_t, ranges::range_reference_t) 832 (ranges::range_rvalue_reference_t, ranges::sized_range) 833 (ranges::output_range, ranges::input_ranges, ranges::forward_range) 834 (ranges::bidirectional_range, ranges::random_access_range) 835 (ranges::contiguous_range, ranges::common::range): Define. 836 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Check 837 that disabled_sized_sentinel can be specialized. 838 * testsuite/std/ranges/access/begin.cc: Include <ranges> instead of 839 <iterator>. 840 * testsuite/std/ranges/access/cbegin.cc: Likewise. 841 * testsuite/std/ranges/access/cdata.cc: Likewise. 842 * testsuite/std/ranges/access/cend.cc: Likewise. 843 * testsuite/std/ranges/access/crbegin.cc: Likewise. 844 * testsuite/std/ranges/access/crend.cc: Likewise. 845 * testsuite/std/ranges/access/data.cc: Likewise. 846 * testsuite/std/ranges/access/empty.cc: Likewise. 847 * testsuite/std/ranges/access/end.cc: Likewise. 848 * testsuite/std/ranges/access/end_neg.cc: Likewise. 849 * testsuite/std/ranges/access/rbegin.cc: Likewise. 850 * testsuite/std/ranges/access/rend.cc: Likewise. 851 * testsuite/std/ranges/access/size.cc: Likewise. 852 * testsuite/std/ranges/access/size_neg.cc: Likewise. 853 * testsuite/std/ranges/headers/ranges/synopsis.cc: New test. 854 * testsuite/std/ranges/range.cc: New test. 855 * testsuite/std/ranges/refinements.cc: New test. 856 * testsuite/std/ranges/sized.cc: New test. 857 * testsuite/util/testsuite_iterators.h: Add aliases for range types. 858 (output_iterator_wrapper::WritableObject::operator=): Add const 859 qualifier so that output_iterator_wrapper satisfies writable. 860 861 * testsuite/20_util/add_pointer/value.cc: Check void types. 862 863 * include/bits/range_access.h (__sizable): Rename to __sentinel_size. 864 Remove workaround for PR c++/92268 and remove redundant requirements 865 that are already checked by sized_sentinel_for. 866 * testsuite/std/ranges/access/cend.cc: Fix failures. 867 * testsuite/std/ranges/access/end.cc: Likewise. 868 869 * include/bits/range_access.h (ranges::begin): Combine array and 870 non-array overloads into one function template. Only use ADL for 871 classes and enums. 872 (ranges::end, ranges::size): Likewise. Make unbounded arrays 873 ill-formed. 874 (ranges::rbegin, ranges::rend): Only use ADL for classes and enums. 875 Reformat _S_noexcept() functions to mirror operator() structure. 876 * testsuite/std/ranges/access/begin.cc: Check incomplete array. 877 * testsuite/std/ranges/access/end_neg.cc: New test. 878 * testsuite/std/ranges/access/size.cc: Check array of incomplete type. 879 * testsuite/std/ranges/access/size_neg.cc: New test. 880 881 * testsuite/24_iterators/range_access*.cc: Move to ... 882 * testsuite/24_iterators/range_access/range_access*.cc: ... here. 883 * testsuite/24_iterators/range_access/range_access_cpp20_neg.cc: New 884 test. 885 8862019-10-30 Jonathan Wakely <jwakely@redhat.com> 887 888 * include/std/concepts (std::ranges::swap): Use a single overload for 889 the non-array cases, and switch using if-constexpr. 890 891 * include/bits/stl_iterator.h (__normal_iterator::iterator_concept): 892 Guard with __cpp_lib_concepts macro. 893 894 * include/std/bit (__cpp_lib_bitops): Define. 895 * include/std/version (__cpp_lib_constexpr): Remove. 896 (__cpp_lib_bitops, __cpp_lib_constexpr_dynamic_alloc): Define. 897 * testsuite/26_numerics/bit/header.cc: New test. 898 * testsuite/26_numerics/bit/header-2.cc: New test. 899 * testsuite/20_util/allocator_traits/header.cc: New test. 900 * testsuite/20_util/allocator_traits/header-2.cc: New test. 901 902 * include/bits/stl_iterator.h (namespace __gnu_cxx): Remove 903 using-declarations for std::iterator and std::iterator_traits. 904 (__gnu_cxx::__normal_iterator): Qualify iterator_traits. 905 * include/ext/algorithm (namespace __gnu_cxx): Remove 906 using-declarations for std names and qualify those names when used. 907 Also refer to std::min in parentheses to protect against function-like 908 macros. 909 * include/ext/rc_string_base.h: Qualify iterator_traits. 910 * include/ext/sso_string_base.h: Qualify iterator_traits. 911 912 PR libstdc++/92272 913 * include/bits/stl_bvector.h (_Bit_iterator::pointer) 914 (_Bit_const_iterator::pointer): Define as void for C++20. 915 * include/bits/stl_iterator.h (reverse_iterator::operator->()): Add 916 constraints for C++20. 917 (__normal_iterator::iterator_concept): Define for C++20. 918 * include/bits/streambuf_iterator.h (istreambuf_iterator::pointer): 919 Define as void for C++20. 920 (ostreambuf_iterator::difference_type): Define as ptrdiff_t for C++20. 921 (ostreambuf_iterator::ostreambuf_iterator()): Add default constructor 922 for C++20. 923 * testsuite/23_containers/vector/bool/iterator_c++20.cc: New test. 924 * testsuite/24_iterators/bidirectional/concept.cc: New test. 925 * testsuite/24_iterators/bidirectional/tag.cc: New test. 926 * testsuite/24_iterators/contiguous/concept.cc: New test. 927 * testsuite/24_iterators/contiguous/tag.cc: New test. 928 * testsuite/24_iterators/forward/concept.cc: New test. 929 * testsuite/24_iterators/forward/tag.cc: New test. 930 * testsuite/24_iterators/input/concept.cc: New test. 931 * testsuite/24_iterators/input/tag.cc: New test. 932 * testsuite/24_iterators/istreambuf_iterator/requirements/typedefs.cc: 933 New test. 934 * testsuite/24_iterators/ostreambuf_iterator/requirements/typedefs.cc: 935 New test. 936 * testsuite/24_iterators/output/concept.cc: New test. 937 * testsuite/24_iterators/output/tag.cc: New test. 938 * testsuite/24_iterators/random_access/concept.cc: New test. 939 * testsuite/24_iterators/random_access/tag.cc: New test. 940 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: New 941 test. 942 * testsuite/24_iterators/random_access_iterator/26020.cc: Move to ... 943 * testsuite/24_iterators/operations/26020.cc: ... here. 944 * testsuite/24_iterators/random_access_iterator/ 945 string_vector_iterators.cc: Move to ... 946 * testsuite/24_iterators/random_access/string_vector_iterators.cc: ... 947 here. 948 949 * testsuite/util/testsuite_iterators.h: Fix typo in __cplusplus check. 950 9512019-10-29 Jonathan Wakely <jwakely@redhat.com> 952 953 * include/bits/range_access.h (ranges::disable_sized_range) 954 (ranges::begin, ranges::end, ranges::cbegin, ranges::cend) 955 (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend) 956 (ranges::size, ranges::empty, ranges::data, ranges::cdata) 957 (ranges::range, ranges::sized_range, ranges::advance, ranges::distance) 958 (ranges::next, ranges::prev): Guard with __cpp_lib_concepts. 959 * include/bits/stl_iterator.h (disable_sized_sentinel): Likewise. 960 961 * include/bits/alloc_traits.h (__cpp_lib_constexpr_dynamic_alloc): 962 Define. 963 (allocator_traits::_S_construct, allocator_traits::_S_destroy) 964 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use 965 _GLIBCXX14_CONSTEXPR instead of constexpr. 966 * include/bits/stl_construct.h (_Destroy): Likewise. 967 968 * include/Makefile.am: Add new header. 969 * include/Makefile.in: Regenerate. 970 * include/bits/iterator_concepts.h: New header. 971 (contiguous_iterator_tag, iter_reference_t, ranges::iter_move) 972 (iter_rvalue_reference_t, incrementable_traits, iter_difference_t) 973 (readable_traits, iter_value_t, readable, iter_common_reference_t) 974 (writable, waekly_incrementable, incrementable) 975 (input_or_output_iterator, sentinel_for, disable_sized_sentinel) 976 (sized_sentinel_for, input_iterator, output_iterator) 977 (forward_iterator, bidirectional_iterator, random_access_iterator) 978 (contiguous_iterator, indirectly_unary_invocable) 979 (indirectly_regular_unary_invocable, indirect_unary_predicate) 980 (indirect_relation, indirect_strict_weak_order, indirect_result_t) 981 (projected, indirectly_movable, indirectly_movable_storable) 982 (indirectly_copyable, indirectly_copyable_storable, ranges::iter_swap) 983 (indirectly_swappable, indirectly_comparable, permutable, mergeable) 984 (sortable, unreachable_sentinel_t, unreachable_sentinel) 985 (default_sentinel_t, default_sentinel): Define. 986 (__detail::__cpp17_iterator, __detail::__cpp17_input_iterator) 987 (__detail::__cpp17_fwd_iterator, __detail::__cpp17_bidi_iterator) 988 (__detail::__cpp17_randacc_iterator): Define. 989 (__iterator_traits): Define constrained specializations. 990 * include/bits/move.h (move): Only use old concept check for C++98. 991 * include/bits/range_access.h (ranges::disable_sized_range) 992 (ranges::begin, ranges::end, ranges::cbegin, ranges::cend) 993 (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend) 994 (ranges::size, ranges::empty, ranges::data, ranges::cdata): Define 995 new customization points for C++20. 996 (ranges::range, ranges::sized_range): Define new concepts for C++20. 997 (ranges::advance, ranges::distance, ranges::next, ranges::prev): 998 Define new functions for C++20. 999 (__adl_end, __adl_cdata, __adl_cbegin, __adl_cend, __adl_rbegin) 1000 (__adl_rend, __adl_crbegin, __adl_crend, __adl_cdata, __adl_size) 1001 (__adl_empty): Remove. 1002 * include/bits/stl_iterator.h (disable_sized_sentinel): Specialize 1003 for reverse_iterator. 1004 * include/bits/stl_iterator_base_types.h (contiguous_iterator_tag): 1005 Define new struct for C++20. 1006 (iterator_traits<_Tp*>): Constrain partial specialization in C++20. 1007 * include/std/concepts (__is_class_or_enum): Move to __detail 1008 namespace. 1009 * testsuite/20_util/forward/c_neg.cc: Adjust dg-error line number. 1010 * testsuite/20_util/forward/f_neg.cc: Likewise. 1011 * testsuite/24_iterators/associated_types/incrementable.traits.cc: New 1012 test. 1013 * testsuite/24_iterators/associated_types/readable.traits.cc: New test. 1014 * testsuite/24_iterators/contiguous/concept.cc: New test. 1015 * testsuite/24_iterators/contiguous/tag.cc: New test. 1016 * testsuite/24_iterators/customization_points/iter_move.cc: New test. 1017 * testsuite/24_iterators/customization_points/iter_swap.cc: New test. 1018 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: New test. 1019 * testsuite/24_iterators/range_operations/advance.cc: New test. 1020 * testsuite/24_iterators/range_operations/distance.cc: New test. 1021 * testsuite/24_iterators/range_operations/next.cc: New test. 1022 * testsuite/24_iterators/range_operations/prev.cc: New test. 1023 * testsuite/26_numerics/adjacent_difference/requirements/ 1024 explicit_instantiation/2.cc: Rename types that conflict with C++20 1025 concepts. 1026 * testsuite/26_numerics/adjacent_difference/requirements/ 1027 explicit_instantiation/pod.cc: Likewise. 1028 * testsuite/26_numerics/partial_sum/requirements/ 1029 explicit_instantiation/2.cc: Likewise. 1030 * testsuite/26_numerics/partial_sum/requirements/ 1031 explicit_instantiation/pod.cc: Likewise. 1032 * testsuite/experimental/iterator/requirements.cc: Likewise. 1033 * testsuite/std/ranges/access/begin.cc: New test. 1034 * testsuite/std/ranges/access/cbegin.cc: New test. 1035 * testsuite/std/ranges/access/cdata.cc: New test. 1036 * testsuite/std/ranges/access/cend.cc: New test. 1037 * testsuite/std/ranges/access/crbegin.cc: New test. 1038 * testsuite/std/ranges/access/crend.cc: New test. 1039 * testsuite/std/ranges/access/data.cc: New test. 1040 * testsuite/std/ranges/access/empty.cc: New test. 1041 * testsuite/std/ranges/access/end.cc: New test. 1042 * testsuite/std/ranges/access/rbegin.cc: New test. 1043 * testsuite/std/ranges/access/rend.cc: New test. 1044 * testsuite/std/ranges/access/size.cc: New test. 1045 * testsuite/util/testsuite_iterators.h (contiguous_iterator_wrapper) 1046 (test_range, test_sized_range): New test utilities. 1047 1048 * testsuite/util/testsuite_iterators.h (BoundsContainer::size()): Add 1049 new member function. 1050 (WritableObject::operator=): Constrain with enable_if when available. 1051 (remove_cv): Use std::remove_if when available. 1052 (test_container::it(int)): Use size(). 1053 (test_container::size()): Use BoundsContainer::size(). 1054 1055 PR libstdc++/92267 1056 * include/bits/stl_deque.h (_Deque_iterator(const _Deque_iterator&)): 1057 Do not define as defaulted. 1058 * testsuite/23_containers/deque/types/92267.cc: New test. 1059 10602019-10-26 Gerald Pfeifer <gerald@pfeifer.com> 1061 1062 * doc/xml/manual/codecvt.xml: Switch pubs.opengroup.org to https. 1063 * doc/xml/manual/locale.xml (LC_ALL): Ditto. 1064 * doc/xml/manual/messages.xml: Ditto. 1065 10662019-10-26 John David Anglin <danglin@gcc.gnu.org> 1067 1068 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update. 1069 10702019-10-25 Jonathan Wakely <jwakely@redhat.com> 1071 1072 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper) 1073 (input_iterator_wrapper, forward_iterator_wrapper) 1074 bidirectional_iterator_wrapper, random_access_iterator_wrapper): Remove 1075 user-provided copy constructors and copy assignment operators so they 1076 are defined implicitly. 1077 (input_iterator_wrapper): Initialize members in default constructor. 1078 (forward_iterator_wrapper): Remove assignments to members of base. 1079 1080 * include/bits/allocator.h: Check __cpp_constexpr_dynamic_alloc 1081 before making the std::allocator destructor constexpr. 1082 * testsuite/20_util/allocator/requirements/constexpr.cc: New test. 1083 1084 * include/bits/range_cmp.h: Check __cpp_lib_concepts before defining 1085 concepts. Fix comment. 1086 * include/bits/allocator.h 1087 10882019-10-25 Gerald Pfeifer <gerald@pfeifer.com> 1089 1090 * doc/xml/manual/policy_data_structures_biblio.xml: Switch 1091 pubs.opengroup.org to https. 1092 10932019-10-25 Gerald Pfeifer <gerald@pfeifer.com> 1094 1095 * doc/xml/gnu/gpl-3.0.xml: Switch www.gnu.org to https. 1096 10972019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net> 1098 1099 * doc/xml/manual/status_cxx2020.xml: Add rows and update status. 1100 11012019-10-24 Jonathan Wakely <jwakely@redhat.com> 1102 1103 * include/bits/allocator.h (allocator<void>): Restore the explicit 1104 specialization for C++20, but make its API consistent with the primary 1105 template. 1106 (allocator::~allocator()): Restore the destructor for C++20, but make 1107 it constexpr. 1108 * testsuite/20_util/allocator/rebind_c++20.cc: Check allocator<void>. 1109 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: Likewise. 1110 * testsuite/20_util/allocator/void.cc: Check that constructors and 1111 destructors are trivial. Check for converting constructor in C++20. 1112 * testsuite/ext/malloc_allocator/variadic_construct.cc: Simplify 1113 dejagnu target selector. 1114 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise. 1115 1116 * include/experimental/executor (__use_future_ct, use_future_t): 1117 Define partial specializations for std::allocator. 1118 (__use_future_ch): Overload constructor for completion tokens using 1119 std::allocator. 1120 1121 PR libstdc++/88338 Implement P0898R3, C++20 concepts library 1122 * doc/xml/manual/status_cxx2020.xml: Update status. 1123 * doc/html/*: Regenerate. 1124 * testsuite/std/concepts/1.cc: New test. 1125 * testsuite/std/concepts/2.cc: New test. 1126 1127 * include/bits/random.h (uniform_random_bit_generator): Define for 1128 C++20. 1129 * testsuite/26_numerics/random/concept.cc: New test. 1130 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line. 1131 11322019-10-23 Jonathan Wakely <jwakely@redhat.com> 1133 1134 * include/std/functional (invoke): Add constexpr for C++20. 1135 * include/std/version (__cpp_lib_constexpr_invoke): Define. 1136 * testsuite/20_util/function_objects/invoke/constexpr.cc: New test. 1137 1138 PR c++/91369 Implement P0784R7 changes to allocation and construction 1139 * include/bits/alloc_traits.h: Include <bits/stl_construct.h>. 1140 (allocator_traits::_S_allocate, allocator_traits::_S_construct) 1141 (allocator_traits::_S_destroy, allocator_traits::_S_max_size) 1142 (allocator_traits::_S_select, allocator_traits::allocate) 1143 (allocator_traits::deallocate, allocator_traits::construct) 1144 (allocator_traits::destroy, allocator_traits::max_size) 1145 (allocator_traits::select_on_container_copy_construction) 1146 (allocator_traits<allocator<T>>): Add constexpr specifier for C++20. 1147 (allocator_traits<allocator<T>>::construct): Use construct_at. 1148 (allocator_traits<allocator<T>>::destroy): Use destroy_at. 1149 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Add constexpr 1150 specifier. 1151 (_Destroy(ForwardIterator, ForwardIterator, Alloc&)) 1152 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move here 1153 from <bits/stl_construct.h>. 1154 * include/bits/allocator.h (allocator::~allocator): Remove for C++20. 1155 (allocator::allocate, allocate::deallocate): Define for C++20 and up. 1156 (operator==, operator!=): Add constexpr specifier for C++20. 1157 * include/bits/stl_construct.h: Don't include <ext/alloc_traits.h>. 1158 (destroy_at): For C++20 add constexpr specifier and support for 1159 destroying arrays. 1160 (construct_at): Define new function for C++20. 1161 (_Construct): Return result of placement new-expression. For C++11 and 1162 up add constexpr. For C++20 dispatch to std::construct_at during 1163 constant evaluation. 1164 (_Destroy(pointer)): Add constexpr specifier. For C++20 dispatch to 1165 std::destroy_at during constant evaluation. 1166 (_Destroy_aux::__destroy, _Destroy_n_aux::__destroy_n): Add constexpr 1167 specifier for C++20. 1168 (_Destroy(ForwardIterator, ForwardIterator)) 1169 (_Destroy(ForwardIterator, Size)): Likewise. Do not elide trivial 1170 destructors during constant evaluation. 1171 (destroy, destroy_n): Add constexpr specifier for C++20. 1172 (_Destroy(ForwardIterator, ForwardIterator, Alloc&)) 1173 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move to 1174 <bits/alloc_traits.h>, to remove dependency on allocators. 1175 * include/bits/stl_uninitialized.h: Include <ext/alloc_traits.h>. 1176 Include <bits/stl_pair.h> instead of <utility>. 1177 * include/ext/alloc_traits.h: Always include <bits/alloc_traits.h>. 1178 (__alloc_traits::construct, __alloc_traits::destroy) 1179 (__alloc_traits::_S_select_on_copy, __alloc_traits::_S_on_swap): Add 1180 constexpr specifier. 1181 * include/ext/malloc_allocator.h (operator==, operator!=): Add 1182 constexpr specifier for C++20. 1183 * include/ext/new_allocator.h (operator==, operator!=): Likewise. 1184 * testsuite/20_util/headers/memory/synopsis.cc: Add constexpr. 1185 * testsuite/20_util/scoped_allocator/69293_neg.cc: Ignore additional 1186 errors due to constexpr function called after failed static_assert. 1187 * testsuite/20_util/specialized_algorithms/construct_at/1.cc: New test. 1188 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: 1189 Ignore additional errors due to constexpr function called after failed 1190 static_assert. 1191 * testsuite/23_containers/vector/cons/destructible_neg.cc: Likewise. 1192 1193 * testsuite/20_util/bind/91371.cc: Fix test to compile as C++11. 1194 1195 * include/debug/helper_functions.h (__valid_range): Change 1196 _GLIBCXX_CONSTEXPR to _GLIBCXX14_CONSTEXPR. 1197 1198 * include/ext/throw_allocator.h (throw_allocator_base): Qualify 1199 size_t and ptrdiff_t. 1200 1201 * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp: 1202 Use detail::rebind_traits. 1203 * include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp: 1204 Likewise. 1205 * include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Likewise. 1206 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise. 1207 * include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp: Likewise. 1208 * include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp: Likewise. 1209 * include/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp: 1210 Likewise. 1211 * include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp: 1212 Likewise. 1213 * include/ext/pb_ds/detail/branch_policy/branch_policy.hpp: Likewise. 1214 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Likewise. 1215 * include/ext/pb_ds/detail/cond_dealtor.hpp: Likewise. 1216 * include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp (has_eq_fn): Likewise. 1217 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Likewise. 1218 * include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp: Likewise. 1219 * include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Likewise. 1220 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ 1221 left_child_next_sibling_heap_.hpp: Likewise. 1222 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp: 1223 Likewise. 1224 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ 1225 point_const_iterator.hpp: Likewise. 1226 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Likewise. 1227 * include/ext/pb_ds/detail/ov_tree_map_/ 1228 constructors_destructor_fn_imps.hpp: Likewise. 1229 * include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Likewise. 1230 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Likewise. 1231 * include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Likewise. 1232 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Likewise. 1233 * include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Likewise. 1234 * include/ext/pb_ds/detail/rb_tree_map_/node.hpp: Likewise. 1235 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Likewise. 1236 * include/ext/pb_ds/detail/splay_tree_/node.hpp: Likewise. 1237 * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Likewise. 1238 * include/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp: 1239 Likewise. 1240 * include/ext/pb_ds/detail/type_utils.hpp: Fix typo in comment. 1241 * include/ext/pb_ds/detail/types_traits.hpp (stored_value): Add 1242 bool parameter to control whether the hash value is stored. 1243 (select_base_type): New class template and partial specialization. 1244 (maybe_null_type): Likewise. 1245 (rebind_traits): New class template. 1246 (type_base): Remove four nearly identical specializations. 1247 (type_dispatch): Remove. 1248 (type_traits): Use select_base_type and maybe_null_type instead of 1249 type_base to control differences between specializations. 1250 * include/ext/pb_ds/list_update_policy.hpp: Use detail::rebind_traits. 1251 * include/ext/pb_ds/priority_queue.hpp: Likewise. 1252 * include/ext/pb_ds/tree_policy.hpp: Likewise. 1253 * include/ext/pb_ds/trie_policy.hpp: Likewise. 1254 1255 * include/backward/hash_set (hash_set): Use __alloc_traits. 1256 * include/backward/hashtable.h (_Hashtable): Likewise. 1257 * include/ext/alloc_traits.h (__alloc_traits::allocate): Add overload 1258 taking a hint. 1259 * include/ext/extptr_allocator.h (_ExtPtr_allocator::allocate): Ignore 1260 hint. 1261 * include/ext/slist (_Slist_base): Use __alloc_traits. 1262 * include/tr1/hashtable.h (_Hashtable): Likewise. 1263 * include/tr1/regex (match_results): Use vector::const_reference 1264 instead of assuming the allocator defines it. 1265 * testsuite/backward/hash_map/23528.cc: Use allocator_traits in C++11. 1266 * testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc: Use 1267 __gnu_test::max_size. 1268 * testsuite/tr1/6_containers/unordered_multimap/capacity/ 1269 29134-multimap.cc: Likewise. 1270 * testsuite/tr1/6_containers/unordered_multiset/capacity/ 1271 29134-multiset.cc: Likewise. 1272 * testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc: 1273 Likewise. 1274 12752019-10-22 Jonathan Wakely <jwakely@redhat.com> 1276 1277 * testsuite/util/testsuite_abi.h: Restore use of tr1/unordered_map 1278 when compiled as C++98. 1279 1280 * include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98. 1281 * testsuite/17_intro/names.cc: Check uses_allocator in C++98. 1282 1283 * include/bits/alloc_traits.h 1284 (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20. 1285 (allocator_traits<allocator<T>>::construct): Perform placement new 1286 directly for C++20, instead of calling allocator<T>::construct. 1287 (allocator_traits<allocator<T>>::destroy): Call destructor directly 1288 for C++20, instead of calling allocator<T>::destroy. 1289 (allocator_traits<allocator<T>>::max_size): Return value directly 1290 for C++20, instead of calling std::allocator<T>::max_size(). 1291 (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not 1292 define for C++17 and up. 1293 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr 1294 for C++17 and up, instead of tag dispatching. 1295 * include/bits/allocator.h (allocator<void>): Remove for C++20. 1296 (allocator::pointer, allocator::const_pointer, allocator::reference) 1297 (allocator::const_reference, allocator::rebind): Remove for C++20. 1298 * include/bits/basic_string.h (basic_string): Use __alloc_traits to 1299 rebind allocator. 1300 * include/bits/memoryfwd.h (allocator<void>): Remove for C++20. 1301 * include/ext/debug_allocator.h: Use __alloc_traits for rebinding. 1302 * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator) 1303 (malloc_allocator::pointer, malloc_allocator::const_pointer) 1304 (malloc_allocator::reference, malloc_allocator::const_reference) 1305 (malloc_allocator::rebind, malloc_allocator::max_size) 1306 (malloc_allocator::construct, malloc_allocator::destroy): Do not 1307 define for C++20. 1308 (malloc_allocator::_M_max_size): Define new function. 1309 * include/ext/new_allocator.h (new_allocator::~new_allocator) 1310 (new_allocator::pointer, new_allocator::const_pointer) 1311 (new_allocator::reference, new_allocator::const_reference) 1312 (new_allocator::rebind, new_allocator::max_size) 1313 (new_allocator::construct, new_allocator::destroy): Do not 1314 define for C++20. 1315 (new_allocator::_M_max_size): Define new function. 1316 * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use 1317 __alloc_traits to rebind allocator. 1318 * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise. 1319 (rope::rope(CharT, const allocator_type&)): Use __alloc_traits 1320 to construct character. 1321 * include/ext/slist (_Slist_base): Use __alloc_traits to rebind 1322 allocator. 1323 * include/ext/sso_string_base.h (__sso_string_base::_M_max_size): 1324 Use __alloc_traits. 1325 * include/ext/throw_allocator.h (throw_allocator): Do not use optional 1326 members of std::allocator, use __alloc_traits members instead. 1327 * include/ext/vstring.h (__versa_string): Use __alloc_traits. 1328 * include/ext/vstring_util.h (__vstring_utility): Likewise. 1329 * include/std/memory: Include <bits/alloc_traits.h>. 1330 * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size. 1331 * testsuite/20_util/allocator/rebind_c++20.cc: New test. 1332 * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check 1333 for pointer, const_pointer, reference, const_reference or rebind in 1334 C++20. 1335 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test. 1336 * testsuite/23_containers/deque/capacity/29134.cc: Use 1337 __gnu_test::max_size. 1338 * testsuite/23_containers/forward_list/capacity/1.cc: Likewise. 1339 * testsuite/23_containers/list/capacity/29134.cc: Likewise. 1340 * testsuite/23_containers/map/capacity/29134.cc: Likewise. 1341 * testsuite/23_containers/multimap/capacity/29134.cc: Likewise. 1342 * testsuite/23_containers/multiset/capacity/29134.cc: Likewise. 1343 * testsuite/23_containers/set/capacity/29134.cc: Likewise. 1344 * testsuite/23_containers/vector/capacity/29134.cc: Likewise. 1345 * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run 1346 test for C++20. 1347 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise. 1348 * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size. 1349 * testsuite/util/replacement_memory_operators.h: Do not assume 1350 Alloc::pointer exists. 1351 * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define 1352 helper to call max_size for any allocator. 1353 13542019-10-22 Andreas Schwab <schwab@suse.de> 1355 1356 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update. 1357 13582019-10-18 Jonathan Wakely <jwakely@redhat.com> 1359 1360 PR libstdc++/92143 1361 * libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment 1362 to at least sizeof(void*). 1363 1364 * include/bits/range_cmp.h (ranges::less::operator()): Inline the 1365 logic from std::less::operator() to remove the dependency on it. 1366 13672019-10-17 Jonathan Wakely <jwakely@redhat.com> 1368 1369 * doc/doxygen/user.cfg.in (INPUT): Add new C++17 and C++20 headers. 1370 1371 * include/Makefile.am: Add new header. 1372 * include/Makefile.in: Regenerate. 1373 * include/bits/range_cmp.h: New header for C++20 function objects. 1374 * include/std/functional: Include new header. 1375 * testsuite/20_util/function_objects/identity/1.cc: New test. 1376 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: New test. 1377 * testsuite/20_util/function_objects/range.cmp/greater.cc: New test. 1378 * testsuite/20_util/function_objects/range.cmp/greater_equal.cc: New 1379 test. 1380 * testsuite/20_util/function_objects/range.cmp/less.cc: New test. 1381 * testsuite/20_util/function_objects/range.cmp/less_equal.cc: New test. 1382 * testsuite/20_util/function_objects/range.cmp/not_equal_to.cc: New 1383 test. 1384 1385 PR libstdc++/92124 1386 * include/bits/forward_list.h 1387 (_M_move_assign(forward_list&&, false_type)): Do not use 1388 __make_move_if_noexcept, instead move unconditionally. 1389 * include/bits/stl_deque.h (_M_move_assign2(deque&&, false_type)): 1390 Likewise. 1391 * include/bits/stl_list.h (_M_move_assign(list&&, false_type)): 1392 Likewise. 1393 * include/bits/stl_vector.h (_M_move_assign(vector&&, false_type)): 1394 Likewise. 1395 * testsuite/23_containers/vector/92124.cc: New test. 1396 13972019-10-16 Jonathan Wakely <jwakely@redhat.com> 1398 1399 * include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to 1400 one of __is_same_as or __is_same when available. 1401 * include/std/concepts (__detail::__same_as): Use std::is_same_v. 1402 * include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]: 1403 Use new macro instead of __is_same_as. 1404 (is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial 1405 specialization. 1406 (is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro. 1407 (is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same. 1408 14092019-10-16 François Dumont <fdumont@gcc.gnu.org> 1410 1411 * src/c++11/debug.cc (print_field): Replace constness_names <unknown> 1412 entry with <unknown constness>. Replace state_names <unknown> entry with 1413 <unknown state>. 1414 14152019-10-11 Jonathan Wakely <jwakely@redhat.com> 1416 1417 * include/Makefile.am: Add new header. 1418 * include/Makefile.in: Regenerate. 1419 * include/precompiled/stdc++.h: Include <concepts>. 1420 * include/std/concepts: New header for C++20. 1421 * include/std/version (__cpp_lib_concepts): Define. 1422 * scripts/create_testsuite_files: Look for test files in new std 1423 directory. 1424 * testsuite/libstdc++-dg/conformance.exp: Likewise. 1425 * testsuite/std/concepts/concepts.callable/invocable.cc: New test. 1426 * testsuite/std/concepts/concepts.callable/regular_invocable.cc: New 1427 test. 1428 * testsuite/std/concepts/concepts.callable/relation.cc: New test. 1429 * testsuite/std/concepts/concepts.callable/strictweakorder.cc: New 1430 test. 1431 * testsuite/std/concepts/concepts.lang/concept.arithmetic/ 1432 floating_point.cc: New test. 1433 * testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc: 1434 New test. 1435 * testsuite/std/concepts/concepts.lang/concept.arithmetic/ 1436 signed_integral.cc: New test. 1437 * testsuite/std/concepts/concepts.lang/concept.arithmetic/ 1438 unsigned_integral.cc: New test. 1439 * testsuite/std/concepts/concepts.lang/concept.assignable/1.cc: New 1440 test. 1441 * testsuite/std/concepts/concepts.lang/concept.common/1.cc: New test. 1442 * testsuite/std/concepts/concepts.lang/concept.commonref/1.cc: New 1443 test. 1444 * testsuite/std/concepts/concepts.lang/concept.constructible/1.cc: 1445 New test. 1446 * testsuite/std/concepts/concepts.lang/concept.convertible/1.cc: 1447 New test. 1448 * testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc: 1449 New test. 1450 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/ 1451 1.cc: New test. 1452 * testsuite/std/concepts/concepts.lang/concept.derived/1.cc: 1453 New test. 1454 * testsuite/std/concepts/concepts.lang/concept.destructible/1.cc: 1455 New test. 1456 * testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc: 1457 New test. 1458 * testsuite/std/concepts/concepts.lang/concept.same/1.cc: 1459 New test. 1460 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc: 1461 New test. 1462 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc: 1463 New test. 1464 * testsuite/std/concepts/concepts.lang/concept.swappable/ 1465 swappable_with.cc: New test. 1466 * testsuite/std/concepts/concepts.object/copyable.cc: New test. 1467 * testsuite/std/concepts/concepts.object/movable.cc: New test. 1468 * testsuite/std/concepts/concepts.object/regular.cc: New test. 1469 * testsuite/std/concepts/concepts.object/semiregular.cc: New test. 1470 1471 * include/std/type_traits (is_same): Replace partial specialization 1472 by using __is_same_as built-in in primary template. 1473 (is_same_v): Use __is_same_as built-in instead of instantiating the 1474 is_same trait. 1475 1476 PR libstdc++/92059 1477 * include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all 1478 special member functions as defaulted. Add noexcept to most members. 1479 (__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)): 1480 Mask off unwanted bits in the __val parameter. Avoid undefined left 1481 shifts. 1482 (__dynamic_bitset_base::_M_assign): Remove. 1483 (__dynamic_bitset_base::_M_do_reset): Use std::fill. 1484 (__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when 1485 block_type has lower rank than int. 1486 (dynamic_bitset): Add noexcept to most members. Use injected-class-name 1487 in return types and parameter types. 1488 (dynamic_bitset::_M_Nb): Add default member initializer. 1489 (dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as 1490 defaulted. 1491 (dynamic_bitset(dynamic_bitset&&)): Clear source object after move. 1492 (dynamic_bitset::operator=(const dynamic_bitset&)): Define as 1493 defaulted. 1494 (dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier. 1495 Define without using swap, to propagate allocator correctly. 1496 (dynamic_bitset(const char*, const _Alloc&)): Use strlen. 1497 (dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use 1498 casts to avoid unwanted integer promotions. 1499 (dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and 1500 add default template arguments and default argument to simplify usage. 1501 (dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr. 1502 (operator==(const dynamic_bitset&, const dynamic_bitset&)) 1503 (operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb. 1504 * include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr): 1505 Adjust template parameters to match declaration. 1506 * testsuite/tr2/dynamic_bitset/cmp.cc: New test. 1507 * testsuite/tr2/dynamic_bitset/cons.cc: New test. 1508 * testsuite/tr2/dynamic_bitset/copy.cc: New test. 1509 * testsuite/tr2/dynamic_bitset/move.cc: New test. 1510 * testsuite/tr2/dynamic_bitset/pr92059.cc: New test. 1511 1512 * include/bits/charconv.h (__to_chars_len): Avoid -Wsign-compare 1513 warnings. 1514 15152019-10-10 Jonathan Wakely <jwakely@redhat.com> 1516 1517 PR libstdc++/91057 1518 * src/c++98/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT] 1519 (find_ldbl_sync_facet): Fix parameter type and missing return. 1520 15212019-10-09 Marek Polacek <polacek@redhat.com> 1522 1523 PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound. 1524 PR c++/69531 - DR 1307: Differently bounded array parameters. 1525 PR c++/88128 - DR 330: Qual convs and pointers to arrays of pointers. 1526 * testsuite/23_containers/span/lwg3255.cc: Adjust test to match the 1527 post-P0388R4 behavior. 1528 15292019-10-09 Jonathan Wakely <jwakely@redhat.com> 1530 1531 PR libstdc++/91057 1532 * src/c++98/locale.cc (locale::id::_M_id()) [__GTHREADS]: Use atomic 1533 compare-exchange or double-checked lock to ensure only one thread sets 1534 the _M_index variable. 1535 [_GLIBCXX_LONG_DOUBLE_COMPAT]: Call find_ldbl_sync_facet to detect 1536 facets that share another facet's ID. 1537 [_GLIBCXX_LONG_DOUBLE_COMPAT] (find_ldbl_sync_facet): New function. 1538 1539 PR libstdc++/78552 1540 * src/c++98/locale_init.cc (locale::classic()): Do not construct a new 1541 locale object for every call. 1542 (locale::_S_initialize_once()): Construct C locale here. 1543 15442019-10-08 Jonathan Wakely <jwakely@redhat.com> 1545 1546 * doc/Makefile.am (doc-html-docbook-regenerate): New target. 1547 (${docbook_outdir}/html): Do not create unused 'html/ext' directory. 1548 * doc/Makefile.in: Regenerate. 1549 * doc/xml/manual/documentation_hacking.xml: Document new target. 1550 * doc/html/*: Regenerate. 1551 1552 * doc/xml/manual/allocator.xml: Use archived copy of CUJ article. 1553 * doc/html/*: Regenerate. 1554 15552019-10-06 François Dumont <fdumont@gcc.gnu.org> 1556 1557 * include/bits/stl_algo.h 1558 (__copy_n_a(_IIte, _Size, _OIte)): New. 1559 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration. 1560 (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use 1561 latter. 1562 * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare 1563 std::__copy_n_a friend. 1564 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New. 1565 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New. 1566 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New. 1567 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New. 1568 1569 * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define 1570 for C++11. 1571 (_RequireInputIte): Likewise and use __enable_if_t. 1572 * include/std/numeric 1573 (__is_random_access_iter): Use __iterator_category_t. 1574 1575 * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment 1576 debug checks. 1577 * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New. 1578 * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New. 1579 15802019-10-04 François Dumont <fdumont@gcc.gnu.org> 1581 1582 * include/debug/forward_list 1583 (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign 1584 distance when not empty. 1585 * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size): 1586 Likewise. 1587 * include/debug/helper_functions.h (__dp_sign_max_size): New 1588 _Distance_precision enum entry. 1589 (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type, 1590 __false_type)): Adapt. 1591 * include/debug/safe_iterator.tcc 1592 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review 1593 distance computation. 1594 15952019-10-04 Jonathan Wakely <jwakely@redhat.com> 1596 1597 PR libstdc++/81091 1598 PR libstdc++/91947 1599 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs. 1600 * config.h.in: Regenerate: 1601 * configure: Regenerate: 1602 * include/Makefile.am (${host_builddir}/largefile-config.h): New 1603 target to generate config header for filesystem library. 1604 (${host_builddir}/c++config.h): Rename macros for large file support. 1605 * include/Makefile.in: Regenerate. 1606 * src/c++17/fs_dir.cc: Include new config header. 1607 * src/c++17/fs_ops.cc: Likewise. 1608 (filesystem::file_size): Use uintmax_t for size. 1609 * src/filesystem/dir.cc: Include new config header. 1610 * src/filesystem/ops.cc: Likewise. 1611 (experimental::filesystem::file_size): Use uintmax_t for size. 1612 1613 * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of 1614 std::tr1::unordered_map. 1615 * testsuite/util/testsuite_allocator.h: Likewise. 1616 1617 * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits. 1618 1619 * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use 1620 __gnu_cxx::__alloc_traits for allocator construct function. 1621 (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function. 1622 1623 * include/precompiled/stdc++.h: Include <span> for C++20. 1624 * testsuite/17_intro/names.cc: Do not define 'e' for C++20. 1625 16262019-10-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 1627 1628 * include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp. 1629 16302019-10-02 Jonathan Wakely <jwakely@redhat.com> 1631 1632 * config/abi/pre/gnu.ver: Tighten up greedy wildcards. 1633 1634 * doc/xml/manual/parallel_mode.xml: Add caveat about support for 1635 recent standards. 1636 * doc/html/*: Regenerate. 1637 16382019-10-01 Jonathan Wakely <jwakely@redhat.com> 1639 1640 * include/experimental/algorithm (experimental::sample): Qualify call 1641 to __sample correctly. 1642 * include/parallel/algo.h (sample, for_each_n): Add using-declarations 1643 for algorithms that don't have parallel implementations. 1644 1645 * include/parallel/algobase.h (equal, lexicographical_compare): Add 1646 _GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being 1647 constant evaluated. 1648 * include/parallel/algorithmfwd.h (equal, lexicographical_compare): 1649 Add _GLIBCXX20_CONSTEXPR. 1650 1651 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for 1652 parallel mode. 1653 * testsuite/20_util/hash/84998.cc: Likewise. 1654 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise. 1655 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise. 1656 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise. 1657 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise. 1658 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise. 1659 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise. 1660 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise. 1661 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc: 1662 Likewise. 1663 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc: 1664 Likewise. 1665 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc: 1666 Likewise. 1667 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc: 1668 Likewise. 1669 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: 1670 Likewise. 1671 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise. 1672 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise. 1673 * testsuite/25_algorithms/copy/86658.cc: Likewise. 1674 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise. 1675 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise. 1676 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise. 1677 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise. 1678 1679 * include/parallel/algo.h: Replace non-reserved names. 1680 * include/parallel/multiway_merge.h: Likewise. 1681 * include/parallel/multiway_mergesort.h: Likewise. 1682 * include/parallel/numericfwd.h: Likewise. 1683 * testsuite/17_intro/names.cc: Add RAI to test macros. 1684 16852019-09-30 François Dumont <fdumont@gcc.gnu.org> 1686 1687 * include/debug/array: Add C++20 constexpr to comparison operators. 1688 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt 1689 dg-error line numbers. 1690 * testsuite/23_containers/array/tuple_interface/ 1691 tuple_element_debug_neg.cc: Likewise. 1692 16932019-09-30 Andreas Tobler <andreast@gcc.gnu.org> 1694 1695 * include/experimental/internet: Include netinet/in.h if we have 1696 _GLIBCXX_HAVE_NETINET_IN_H defined. 1697 1698 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the 1699 FreeBSD warning about lower advertised precision of tgammal. 1700 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise. 1701 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise. 1702 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise. 1703 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise. 1704 * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise. 1705 * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise. 1706 * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise. 1707 * testsuite/tr1/5_numerical_facilities/special_functions/ 1708 08_cyl_bessel_i/check_nan.cc: Likewise. 1709 * testsuite/tr1/5_numerical_facilities/special_functions/ 1710 09_cyl_bessel_j/check_nan.cc: Likewise. 1711 * testuite/tr1/5_numerical_facilities/special_functions/ 1712 10_cyl_bessel_k/check_nan.cc: Likewise. 1713 * testsuite/tr1/5_numerical_facilities/special_functions/ 1714 11_cyl_neumann/check_nan.cc: Likewise. 1715 * testsuite/tr1/5_numerical_facilities/special_functions/ 1716 21_sph_bessel/check_nan.cc: Likewise. 1717 * testsuite/tr1/5_numerical_facilities/special_functions/ 1718 23_sph_neumann/check_nan.cc: Likewise. 1719 17202019-09-30 Jonathan Wakely <jwakely@redhat.com> 1721 1722 * include/std/span (span(element_type(&)[N])) 1723 (span(array<value_type, N>&), span(const array<value_type, N>&)): 1724 Deduce array element type to allow safe const conversions (LWG 3255). 1725 [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use 1726 remove_cv_t on arguments to __is_std_span and __is_std_array. 1727 * testsuite/23_containers/span/lwg3255.cc: New test. 1728 1729 PR libstdc++/77936 1730 * include/parallel/checkers.h (__is_sorted): Remove unused variable. 1731 17322019-09-28 François Dumont <fdumont@gcc.gnu.org> 1733 1734 * include/bits/stl_algo.h (merge): Fix documentation. 1735 * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr. 1736 (__check_sorted): Likewise and remove nested irreflexive check. 1737 (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr. 1738 (__check_partitioned_lower, __check_partitioned_upper): Likewise. 1739 (_Irreflexive_checker::_S_is_valid): Likewise. 1740 (__is_irreflexive, __is_irreflexive_pred): Likewise. 1741 * include/debug/helper_functions.h (__get_distance): Add constexpr. 1742 (__valid_range_aux): Add C++20 constexpr. 1743 (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)): 1744 Likewise and add std::is_constant_evaluated check. 1745 (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New. 1746 (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New. 1747 (__valid_range_aux(_Integral, _Integral, std::__true_type)): New, 1748 use latter. 1749 (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and 1750 __builtin_is_contant_evaludated check.. 1751 (__can_advance, __base): Add constexpr. 1752 * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED] 1753 (_GLIBCXX_DEBUG_VERIFY_COND_AT): New. 1754 (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive. 1755 (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred. 1756 * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive 1757 std::less. 1758 * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise. 1759 * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix 1760 lambda to be irreflexive. 1761 17622019-09-27 Maciej W. Rozycki <macro@wdc.com> 1763 1764 * configure: Regenerate. 1765 17662019-09-27 Jonathan Wakely <jwakely@redhat.com> 1767 1768 PR libstdc++/91910 1769 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer 1770 atomically and lock the mutex before accessing the sequence. 1771 (_Safe_local_iterator_base::_M_detach()): Likewise. 1772 (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically. 1773 17742019-09-26 Jonathan Wakely <jwakely@redhat.com> 1775 1776 * include/debug/array (to_array): Define for debug mode. 1777 1778 * include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to 1779 piecewise construction constructor, assignment operators, and swap. 1780 * include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)): 1781 Add _GLIBCXX20_CONSTEXPR. 1782 (pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise. 1783 * testsuite/20_util/pair/constexpr_assign.cc: New test. 1784 * testsuite/20_util/pair/constexpr_swap.cc: New test. 1785 1786 * include/experimental/internet (operator==, operator<): Fix loop 1787 condition to avoid reading past the end of the array. 1788 1789 * include/std/array: Remove references to profile mode. 1790 * include/std/bitset: Likewise. 1791 * include/std/deque: Likewise. 1792 * include/std/forward_list: Likewise. 1793 * include/std/list: Likewise. 1794 * include/std/map: Likewise. 1795 * include/std/set: Likewise. 1796 * include/std/unordered_map: Likewise. 1797 * include/std/unordered_set: Likewise. 1798 * include/std/vector: Likewise. 1799 * testsuite/17_intro/headers/c++1998/profile_mode.cc: New test. 1800 * testsuite/17_intro/headers/c++2011/profile_mode.cc: New test. 1801 18022019-09-25 Jonathan Wakely <jwakely@redhat.com> 1803 1804 * include/bits/regex.h 1805 (basic_regex::assign(const C*, size_t, flag_type)): Add default 1806 argument (LWG 3296). 1807 * testsuite/28_regex/basic_regex/assign/char/lwg3296.cc: New test. 1808 * testsuite/28_regex/basic_regex/assign/wchar_t/lwg3296.cc: New test. 1809 18102019-09-24 Jonathan Wakely <jwakely@redhat.com> 1811 1812 * include/std/variant (variant::index()): Remove impossible case. 1813 1814 PR libstdc++/91871 1815 * testsuite/util/testsuite_hooks.h 1816 (conversion::iterator_to_const_iterator()): Do not return an invalid 1817 iterator. Test direct-initialization and direct-list-initialization 1818 as well as implicit conversion. 1819 18202019-09-23 Jonathan Wakely <jwakely@redhat.com> 1821 1822 PR libstdc++/91788 (partial) 1823 * include/std/variant (variant::index()): Improve codegen for cases 1824 where conversion to size_t already works correctly. 1825 18262019-09-23 Andreas Schwab <schwab@suse.de> 1827 1828 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update. 1829 18302019-09-12 Jonathan Wakely <jwakely@redhat.com> 1831 1832 PR libstdc++/91748 1833 * include/bits/stl_algo.h (for_each_n): Fix random access iterator 1834 case. 1835 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random 1836 access iterators. 1837 18382019-09-11 Jonathan Wakely <jwakely@redhat.com> 1839 1840 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__): 1841 Fix syntax error. 1842 1843 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile 1844 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests. 1845 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile 1846 for C++2a and up. 1847 18482019-09-10 Jonathan Wakely <jwakely@redhat.com> 1849 1850 * include/std/type_traits (__do_common_type_impl): Implement 1851 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20. 1852 (basic_common_reference, common_reference, common_reference_t): Define 1853 for C++20. 1854 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New 1855 test. 1856 * testsuite/20_util/common_reference/requirements/ 1857 explicit_instantiation.cc: New test. 1858 * testsuite/20_util/common_reference/requirements/typedefs.cc: New 1859 test. 1860 1861 * include/std/charconv (to_chars): Rename to __to_chars_i. Define 1862 non-template overloads for each signed and unsigned integer type and 1863 char. Define deleted overload for bool (LWG 3266). 1864 * testsuite/20_util/to_chars/1_neg.cc: Remove. 1865 * testsuite/20_util/to_chars/3.cc: New test. 1866 * testsuite/20_util/to_chars/lwg3266.cc: New test. 1867 18682019-09-10 Christophe Lyon <christophe.lyon@st.com> 1869 1870 * acinclude.m4: Handle uclinux*. 1871 * configure: Regenerate. 1872 * configure.host: Handle uclinux* 1873 18742019-09-10 Christophe Lyon <christophe.lyon@st.com> 1875 Mickaël Guêné <mickael.guene@st.com> 1876 1877 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC 1878 support. 1879 18802019-09-10 Jonathan Wakely <jwakely@redhat.com> 1881 1882 PR libstdc++/91711 1883 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to 1884 0ul being a valid null pointer constant. 1885 1886 * include/std/type_traits (__remove_cv_t): New alias template. 1887 (is_void, is_integral, is_floating_point, is_pointer) 1888 (is_member_object_pointer, is_member_function_pointer, is_null_pointer) 1889 (is_member_point), __is_signed_integer, __is_unsigned_integer) 1890 (__make_unsigned_selector, __make_signed_selector, remove_pointer) 1891 (__decay_selector): Use __remove_cv_t. 1892 (remove_cv): Add partial specializations for cv-qualified types. 1893 (__decay_t): New alias template. 1894 (__decay_and_strip, __common_type_impl, __result_of_impl): Use 1895 __decay_t. 1896 (__enable_if_t): Move earlier in the file. 1897 (_Require): Use __enable_if_t. 1898 (swap(T&, T&)): Use _Require. 1899 (swap(T(&)[N])): Use __enable_if_t. 1900 19012019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net> 1902 1903 Implement C++20 p1424 - 'constexpr' feature macro concerns, 1904 Issue 3256 - Feature testing macro for constexpr algorithms, 1905 and Issue 3257 - Missing feature testing macro update from P0858. 1906 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value. 1907 * include/bits/algorithmfwd.h: Ditto. 1908 * include/std/utility: Ditto. 1909 * testsuite/25_algorithms/constexpr_macro.cc: Ditto. 1910 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for 1911 __cpp_lib_constexpr macro in <algorith>. 1912 * testsuite/20_util/exchange/constexpr.cc: Add check for 1913 __cpp_lib_constexpr macro in <utility>. 1914 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for 1915 __cpp_lib_constexpr_algorithms. 1916 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto. 1917 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto. 1918 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto. 1919 * testsuite/25_algorithms/copy/constexpr.cc: Ditto. 1920 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto. 1921 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto. 1922 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto. 1923 * testsuite/25_algorithms/count/constexpr.cc: Ditto. 1924 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto. 1925 * testsuite/25_algorithms/equal/constexpr.cc: Ditto. 1926 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto. 1927 * testsuite/25_algorithms/fill/constexpr.cc: Ditto. 1928 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto. 1929 * testsuite/25_algorithms/find/constexpr.cc: Ditto. 1930 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto. 1931 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto. 1932 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto. 1933 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto. 1934 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto. 1935 * testsuite/25_algorithms/generate/constexpr.cc: Ditto. 1936 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto. 1937 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto. 1938 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto. 1939 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto. 1940 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto. 1941 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto. 1942 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto. 1943 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto. 1944 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto. 1945 * testsuite/25_algorithms/merge/constexpr.cc: Ditto. 1946 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto. 1947 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto. 1948 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto. 1949 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto. 1950 * testsuite/25_algorithms/remove/constexpr.cc: Ditto. 1951 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto. 1952 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto. 1953 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto. 1954 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto. 1955 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto. 1956 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto. 1957 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto. 1958 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto. 1959 * testsuite/25_algorithms/search/constexpr.cc: Ditto. 1960 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto. 1961 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto. 1962 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto. 1963 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto. 1964 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto. 1965 * testsuite/25_algorithms/transform/constexpr.cc: Ditto. 1966 * testsuite/25_algorithms/unique/constexpr.cc: Ditto. 1967 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto. 1968 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto. 1969 19702019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net> 1971 1972 Update docs for recent <span> and constexpr lib changes. 1973 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0, 1974 p1023r0, p1085r2 status. 1975 * doc/html/manual/status.html: Regenerate. 1976 19772019-09-09 Antony Polukhin <antoshkka@gmail.com> 1978 1979 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace 1980 final offsets with constants. 1981 19822019-09-09 Jonathan Wakely <jwakely@redhat.com> 1983 1984 * include/bits/range_access.h (__adl_to_address): Remove. 1985 * include/std/span (__is_base_derived_safe_convertible_v): Replace 1986 with span::__is_compatible. 1987 (__is_std_array_v): Replace with __is_std_array class template and 1988 partial specializations. 1989 (__is_std_array, __is_std_span): New class templates and partial 1990 specializations. 1991 (span::__is_compatible): New alias template for SFINAE constraints. 1992 (span::span(element_type (&)[N])): Remove redundant constraints. Do 1993 not use __adl_data to obtain a pointer. 1994 (span::span(array<value_type, N>&)): Likewise. 1995 (span::span(const array<value_type, N>&)): Likewise. 1996 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t) 1997 (span::iter_value_t, span::derived_from): New alias templates for 1998 SFINAE constraints, until the equivalents are supported in <concepts> 1999 and <iterator>. 2000 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template 2001 for SFINAE constraints. 2002 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for 2003 SFINAE constraints. 2004 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints. 2005 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise. 2006 Use std::to_address instead of __adl_to_address. 2007 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise. 2008 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias 2009 template for SFINAE constraints. 2010 [!_GLIBCXX_P1394] (span::span(Container&)) 2011 (span::span(const Container&)): Improve constraints. 2012 [!_GLIBCXX_P1394] (span::span(pointer, size_type)) 2013 (span::span(pointer, pointer)): Remove redundant cast of pointer. 2014 (span(const span<OType, OExtent>&)): New constructor. 2015 20162019-09-06 Jonathan Wakely <jwakely@redhat.com> 2017 2018 * include/bits/range_access.h (ssize): Define for C++20. 2019 * testsuite/24_iterators/range_access_cpp20.cc: New test. 2020 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status. 2021 * doc/html/*: Regenerate. 2022 20232019-09-06 Florian Weimer <fweimer@redhat.com> 2024 2025 * configure: Regenerate. 2026 20272019-09-05 Jonathan Wakely <jwakely@redhat.com> 2028 2029 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and 2030 P1024R3. Remove entry for P0920R2. 2031 * include/std/span (__cpp_lib_span): Change value. 2032 (__extent_storage, __extent_storage<dynamic_extent>): Remove default 2033 constructor. 2034 (span): Replace __extent_storage base class with data member. 2035 (span::_S_subspan_extent): New function. 2036 (span::empty()): Add nodiscard attribute. 2037 (span::front, span::back, span::operator[]): Check preconditions. 2038 (span::first, span::last, span::subspan): Add noexcept. Improve 2039 precondition checks (LWG 3103). 2040 (get): Remove redundant condition from static_assert. 2041 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify. 2042 (as_writable_bytes): Add inline specifier. 2043 * include/std/version (__cpp_lib_span): Change value. 2044 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon. 2045 * testsuite/23_containers/span/front_neg.cc: Likewise. 2046 * testsuite/23_containers/span/index_op_neg.cc: Likewise. 2047 * testsuite/23_containers/span/last_neg.cc: Improve test. 2048 * testsuite/23_containers/span/subspan_neg.cc: Likewise. 2049 * testsuite/23_containers/span/1.cc: New test. 2050 * testsuite/23_containers/span/2.cc: New test. 2051 * testsuite/23_containers/span/back_assert_neg.cc: New test. 2052 * testsuite/23_containers/span/first_2_assert_neg.cc: New test. 2053 * testsuite/23_containers/span/first_assert_neg.cc: New test. 2054 * testsuite/23_containers/span/first_neg.cc: New test. 2055 * testsuite/23_containers/span/front_assert_neg.cc: New test. 2056 * testsuite/23_containers/span/index_op_assert_neg.cc: New test. 2057 * testsuite/23_containers/span/last_2_assert_neg.cc: New test. 2058 * testsuite/23_containers/span/last_assert_neg.cc: New test. 2059 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test. 2060 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test. 2061 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test. 2062 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test. 2063 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test. 2064 * testsuite/23_containers/span/subspan_assert_neg.cc: New test. 2065 20662019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com> 2067 2068 * include/Makefile.am: Add <span> header. 2069 * include/Makefile.in: Regenerate. 2070 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin) 2071 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend) 2072 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address): 2073 New functions for performing argument-dependent lookup of range 2074 customization points. 2075 * include/bits/stl_iterator.h (__normal_iterator): Add 2076 _GLIBCXX20_CONSTEXPR to all functions. 2077 * include/std/span: New header. 2078 * include/std/version (__cpp_lib_span): Define feature test macro. 2079 * testsuite/23_containers/span/contiguous_range_neg.cc: New test. 2080 * testsuite/23_containers/span/everything.cc: New test. 2081 * testsuite/23_containers/span/get_neg.cc: New test. 2082 * testsuite/23_containers/span/last_neg.cc: New test. 2083 * testsuite/23_containers/span/subspan_neg.cc: New test. 2084 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test. 2085 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test. 2086 * testsuite/23_containers/span/tuple_size_neg.cc: New test. 2087 20882019-09-05 Jonathan Wakely <jwakely@redhat.com> 2089 2090 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry. 2091 * doc/html/*: Regenerate. 2092 20932019-09-04 Mike Crowe <mac@mcrowe.com> 2094 2095 PR libstdc++/41861 2096 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new 2097 pthread_cond_clockwait function. 2098 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT. 2099 * configure: Regenerate. 2100 * config.h.in: Regenerate. 2101 * include/std/condition_variable: (condition_variable): Rename 2102 __steady_clock_t typedef and add system_clock. Change __clock_t to be 2103 a typedef for the preferred clock to convert arbitrary other clocks to. 2104 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock 2105 overload. 2106 (wait_until): Change __clock_t overload to use system_clock. 2107 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add 2108 steady_clock overload that calls pthread_cond_clockwait. 2109 (__wait_until_impl): Change __clock_t overload to use system_clock. 2110 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use 2111 steady_clock for __clock_t if pthread_cond_clockwait is available. 2112 21132019-09-04 Mike Crowe <mac@mcrowe.com> 2114 2115 * testsuite/30_threads/condition_variable/members/2.cc (test01): 2116 Parameterise so that test can be run against an arbitrary clock. 2117 (main): Test using std::chrono::steady_clock and a user-defined 2118 clock in addition to the previous std::chrono::system_clock. 2119 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. 2120 21212019-09-03 Ulrich Weigand <uweigand@de.ibm.com> 2122 2123 * crossconfig.m4: Remove references to spu. 2124 * configure: Regenerate. 2125 * doc/xml/manual/appendix_contributing.xml: Remove references 2126 to __ea as "badword" for spu. 2127 * doc/html/manual/source_code_style.html: Regenerate. 2128 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt 2129 to avoid __ea (as "badword" for spu). 2130 (__ellint_rj): Likewise. 2131 21322019-09-03 Chung-Lin Tang <cltang@codesourcery.com> 2133 2134 PR other/79543 2135 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version 2136 scanning to conform to the GNU Coding Standards. 2137 * configure: Regenerate. 2138 21392019-09-02 Jonathan Wakely <jwakely@redhat.com> 2140 2141 * src/c++17/memory_resource.cc: Use __constinit keyword. 2142 21432019-09-02 Jonathan Wakely <jwakely@redhat.com> 2144 2145 * doc/xml/manual/abi.xml: Document 9.x library versions. 2146 * doc/html/*: Regenerate. 2147 21482019-09-02 Jonathan Wakely <jwakely@redhat.com> 2149 2150 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1. 2151 (__detail::__to_chars_8_len): Remove. 2152 (__detail::__to_chars_8): Inline length calculation here. 2153 (__detail::__from_chars_binary): Use numeric_limits instead of 2154 CHAR_BIT. 2155 21562019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2157 2158 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate. 2159 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise. 2160 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise. 2161 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt: 2162 Likewise. 2163 21642019-09-01 François Dumont <fdumont@gcc.gnu.org> 2165 2166 * testsuite_files/util/testsuite_performance.h 2167 (resource_counter::start): Ignore unused malloc(0) result. 2168 21692019-09-01 Gerald Pfeifer <gerald@pfeifer.com> 2170 2171 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component 2172 Model Object Technologies): Adjust name and link. 2173 21742019-08-30 Antony Polukhin <antoshkka@gmail.com> 2175 2176 * include/std/charconv (__detail::__to_chars_8) 2177 __detail::__to_chars_16): Replace array of precomputed digits with 2178 arithmetic operations to avoid CPU cache misses. Remove zero 2179 termination from array of digits to allow symbol merge with generic 2180 implementation of __detail::__to_chars. Replace final offsets with 2181 constants. Use __detail::__to_chars_len_2 instead of a generic 2182 __detail::__to_chars_len. 2183 (__detail::__to_chars): Remove zero termination from array of digits. 2184 (__detail::__to_chars_2): Leading digit is always '1'. 2185 21862019-08-30 Jonathan Wakely <jwakely@redhat.com> 2187 2188 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors. 2189 21902019-08-30 Uros Bizjak <ubizjak@gmail.com> 2191 2192 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update. 2193 21942019-08-30 Jonathan Wakely <jwakely@redhat.com> 2195 2196 PR libstdc++/89164 2197 * include/bits/stl_algobase.h (__copy_move): Give descriptive names 2198 to template parameters. 2199 * include/bits/stl_uninitialized.h (uninitialized_copy) 2200 (uninitialized_fill, uninitialized_fill_n): Add static assertions to 2201 diagnose invalid uses. 2202 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc: 2203 Adjust expected error. 2204 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc: 2205 New test. 2206 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/ 2207 89164.cc: New test. 2208 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc: 2209 New test. 2210 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/ 2211 89164.cc: New test. 2212 * testsuite/23_containers/vector/cons/89164.cc: New test. 2213 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test. 2214 22152019-08-29 Jonathan Wakely <jwakely@redhat.com> 2216 2217 PR libstdc++/91067 2218 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0. 2219 * configure: Regenerate. 2220 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export 2221 missing symbols. 2222 * testsuite/27_io/filesystem/iterators/91067.cc: Test move 2223 constructors. 2224 * testsuite/util/testsuite_abi.cc: Add new symbol version. 2225 22262019-08-29 Jakub Jelinek <jakub@redhat.com> 2227 2228 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update. 2229 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update. 2230 22312019-08-28 Jonathan Wakely <jwakely@redhat.com> 2232 2233 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update. 2234 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update. 2235 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update. 2236 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update. 2237 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update. 2238 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update. 2239 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update. 2240 22412019-08-23 Joseph Myers <joseph@codesourcery.com> 2242 2243 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS] 2244 (std::filesystem::__gnu_posix::lstat): Add return type. 2245 22462019-08-20 Jonathan Wakely <jwakely@redhat.com> 2247 2248 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers. 2249 2250 * include/std/numeric (reduce): Fix Doxygen markup. 2251 2252 PR libstdc++/91371 2253 * include/std/type_traits (is_function): Simplify definition. Remove 2254 partial specializations for function types. 2255 (__is_referenceable): Simplify definition. 2256 * testsuite/20_util/bind/91371.cc: New test. 2257 * testsuite/20_util/is_function/91371.cc: New test. 2258 * testsuite/20_util/is_function/value.cc: Check more pointer types. 2259 * testsuite/20_util/is_member_function_pointer/91371.cc: New test. 2260 * testsuite/20_util/is_object/91371.cc: New test. 2261 22622019-08-16 Uros Bizjak <ubizjak@gmail.com> 2263 2264 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update. 2265 22662019-08-15 Jonathan Wakely <jwakely@redhat.com> 2267 2268 PR libstdc++/91456 2269 * include/bits/std_function.h (__check_func_return_type): Remove. 2270 (function::_Callable): Use std::__is_invocable_impl instead of 2271 __check_func_return_type. 2272 * include/std/type_traits (__is_invocable_impl): Add another defaulted 2273 template parameter. Define a separate partial specialization for 2274 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check 2275 with a check that models delayed temporary materialization. 2276 * testsuite/20_util/function/91456.cc: New test. 2277 * testsuite/20_util/is_invocable/91456.cc: New test. 2278 22792019-08-14 Jonathan Wakely <jwakely@redhat.com> 2280 2281 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute. 2282 22832019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net> 2284 2285 Implement C++20 p0879 - Constexpr for swap and swap related functions. 2286 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro. 2287 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms): 2288 New macro. 2289 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap) 2290 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap) 2291 (swap_ranges, nth_element, partial_sort, sort): Add constexpr. 2292 * include/bits/move.h (swap): Add constexpr. 2293 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse) 2294 (__gcd, __rotate, rotate, __partition, __heap_select) 2295 (__partial_sort_copy, partial_sort_copy, __unguarded_partition) 2296 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort) 2297 (__introselect, __chunk_insertion_sort, next_permutation) 2298 (prev_permutation, partition, partial_sort, nth_element, sort) 2299 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr. 2300 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap) 2301 (swap_ranges): Add constexpr. 2302 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap, 2303 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap): 2304 Add constexpr. 2305 * include/std/type_traits (swap): Add constexpr. 2306 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr. 2307 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test. 2308 * testsuite/25_algorithms/make_heap/constexpr.cc: New test. 2309 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test. 2310 * testsuite/25_algorithms/nth_element/constexpr.cc: New test. 2311 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test. 2312 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test. 2313 * testsuite/25_algorithms/partition/constexpr.cc: New test. 2314 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test. 2315 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test. 2316 * testsuite/25_algorithms/push_heap/constexpr.cc: New test. 2317 * testsuite/25_algorithms/reverse/constexpr.cc: New test. 2318 * testsuite/25_algorithms/rotate/constexpr.cc: New test. 2319 * testsuite/25_algorithms/sort/constexpr.cc: New test. 2320 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test. 2321 * testsuite/25_algorithms/swap/constexpr.cc: New test. 2322 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test. 2323 23242019-08-12 Jonathan Wakely <jwakely@redhat.com> 2325 2326 PR libstdc++/90361 2327 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default. 2328 2329 * include/std/tuple (__unpack_std_tuple): New variable template and 2330 partial specializations. 2331 (apply, make_from_tuple): Add noexcept-specifier. 2332 * testsuite/20_util/tuple/apply/2.cc: New test. 2333 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test. 2334 23352019-08-09 Corentin Gay <gay@adacore.com> 2336 2337 * testsuite/ext/random/beta_distribution/operators/serialize.cc, 2338 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc, 2339 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc, 2340 testsuite/ext/random/triangular_distribution/operators/serialize.cc, 2341 testsuite/ext/random/von_mises_distribution/operators/serialize.cc: 2342 Add call to `VERIFY`. 2343 23442019-08-09 Alexandre Oliva <oliva@adacore.com> 2345 2346 * include/ext/random 2347 (normal_mv_distribution::param_type::param_type): New private 2348 ctor taking a decomposed varcov matrix, for use by... 2349 (operator>>): ... this, befriended. 2350 * include/ext/random.tcc (operator>>): Use it. 2351 (normal_mv_distribution::param_type::_M_init_lower): Adjust 2352 member function name in exception message. 2353 23542019-08-08 Jonathan Wakely <jwakely@redhat.com> 2355 2356 P0325R4 to_array from LFTS with updates 2357 * include/experimental/array (to_array): Qualify call to __to_array. 2358 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20. 2359 * include/std/version (__cpp_lib_to_array): Likewise. 2360 * testsuite/23_containers/array/creation/1.cc: New test. 2361 * testsuite/23_containers/array/creation/2.cc: New test. 2362 * testsuite/23_containers/array/creation/3_neg.cc: New test. 2363 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc: 2364 Use zero for dg-error line number. 2365 23662019-08-06 Jonathan Wakely <jwakely@redhat.com> 2367 2368 P1651R0 bind_front should not unwrap reference_wrapper 2369 * include/std/functional (bind_front): Don't unwrap reference_wrapper. 2370 * include/std/version (__cpp_lib_bind_front): Update value. 2371 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for 2372 feature test macro. 2373 * testsuite/20_util/function_objects/bind_front/2.cc: New test. 2374 2375 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128] 2376 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v) 2377 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit 2378 specializations for __float128. 2379 * testsuite/26_numerics/numbers/float128.cc: New test. 2380 23812019-08-04 Gerald Pfeifer <gerald@pfeifer.com> 2382 2383 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now 2384 doxygen.nl. 2385 23862019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net> 2387 2388 Implement C++20 p0202 - Add Constexpr Modifiers to Functions 2389 in <algorithm> and <utility> Headers. 2390 Implement C++20 p1023 - constexpr comparison operators for std::array. 2391 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy, 2392 copy_backward, copy_if, copy_n, equal_range, fill, find_end, 2393 find_if_not, includes, is_heap, is_heap_until, is_partitioned, 2394 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound, 2395 none_of, partition_copy, partition_point, remove, remove_if, 2396 remove_copy, remove_copy_if, replace_copy, replace_copy_if, 2397 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count, 2398 count_if, equal, find, find_first_of, find_if, for_each, generate, 2399 generate_n, lexicographical_compare, merge, mismatch, replace, 2400 replace_if, search, search_n, set_difference, set_intersection, 2401 set_symmetric_difference, set_union, transform, unique_copy): 2402 Mark constexpr. 2403 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr. 2404 * include/bits/predefined_ops.h (_Iter_less_val::operator(), 2405 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(), 2406 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()): 2407 Use const ref instead of ref arg; 2408 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter, 2409 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val, 2410 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val, 2411 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter, 2412 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter, 2413 __iter_comp_iter): Mark constexpr. 2414 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n, 2415 __search, __search_n_aux, __search_n, __find_end, find_end, all_of, 2416 none_of, any_of, find_if_not, is_partitioned, partition_point, 2417 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n, 2418 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find, 2419 __unique, unique, __unique_copy, reverse_copy, rotate_copy, 2420 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort, 2421 __final_insertion_sort, lower_bound, __upper_bound, upper_bound, 2422 __equal_range, equal_range, binary_search, __includes, includes, 2423 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy, 2424 replace_copy_if, __count_if, is_sorted, __is_sorted_until, 2425 is_sorted_until, __is_permutation, is_permutation, for_each, find, 2426 find_if, find_first_of, adjacent_find, count, count_if, search, 2427 search_n, transform, replace, replace_if, generate, generate_n, 2428 unique_copy, __merge, merge, __set_union, set_union, __set_intersection, 2429 set_intersection, __set_difference, set_difference, 2430 __set_symmetric_difference, set_symmetric_difference): Mark constexpr. 2431 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr 2432 wrappers around __builtin_memmove and __builtin_memcmp 2433 respectively; 2434 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2, 2435 copy, move, __copy_move_b, __copy_move_backward_a, 2436 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill, 2437 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2, 2438 __lexicographical_compare_impl, __lexicographical_compare, 2439 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux, 2440 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare, 2441 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until, 2442 is_heap): Mark constexpr. 2443 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until, 2444 is_heap): Mark constexpr. 2445 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr. 2446 * include/std/array: Make comparison ops constexpr. 2447 * include/std/utility: Make exchange constexpr. 2448 * include/std/version (__cpp_lib_constexpr_algorithms): New macro. 2449 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust. 2450 * testsuite/23_containers/array/tuple_interface/ 2451 tuple_element_neg.cc: Adjust. 2452 * testsuite/20_util/exchange/constexpr.cc: New. 2453 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New. 2454 * testsuite/25_algorithms/constexpr_macro.cc: New. 2455 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New. 2456 * testsuite/25_algorithms/all_of/constexpr.cc: New. 2457 * testsuite/25_algorithms/any_of/constexpr.cc: New. 2458 * testsuite/25_algorithms/binary_search/constexpr.cc: New. 2459 * testsuite/25_algorithms/copy/constexpr.cc: New. 2460 * testsuite/25_algorithms/copy_backward/constexpr.cc: New. 2461 * testsuite/25_algorithms/copy_if/constexpr.cc: New. 2462 * testsuite/25_algorithms/copy_n/constexpr.cc: New. 2463 * testsuite/25_algorithms/count/constexpr.cc: New. 2464 * testsuite/25_algorithms/count_if/constexpr.cc: New. 2465 * testsuite/25_algorithms/equal/constexpr.cc: New. 2466 * testsuite/25_algorithms/equal_range/constexpr.cc: New. 2467 * testsuite/25_algorithms/fill/constexpr.cc: New. 2468 * testsuite/25_algorithms/fill_n/constexpr.cc: New. 2469 * testsuite/25_algorithms/find/constexpr.cc: New. 2470 * testsuite/25_algorithms/find_end/constexpr.cc: New. 2471 * testsuite/25_algorithms/find_first_of/constexpr.cc: New. 2472 * testsuite/25_algorithms/find_if/constexpr.cc: New. 2473 * testsuite/25_algorithms/find_if_not/constexpr.cc: New. 2474 * testsuite/25_algorithms/for_each/constexpr.cc: New. 2475 * testsuite/25_algorithms/generate/constexpr.cc: New. 2476 * testsuite/25_algorithms/generate_n/constexpr.cc: New. 2477 * testsuite/25_algorithms/is_heap/constexpr.cc: New. 2478 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New. 2479 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New. 2480 * testsuite/25_algorithms/is_permutation/constexpr.cc: New. 2481 * testsuite/25_algorithms/is_sorted/constexpr.cc: New. 2482 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New. 2483 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New. 2484 * testsuite/25_algorithms/lower_bound/constexpr.cc: New. 2485 * testsuite/25_algorithms/merge/constexpr.cc: New. 2486 * testsuite/25_algorithms/mismatch/constexpr.cc: New. 2487 * testsuite/25_algorithms/none_of/constexpr.cc: New. 2488 * testsuite/25_algorithms/partition_copy/constexpr.cc: New. 2489 * testsuite/25_algorithms/partition_point/constexpr.cc: New. 2490 * testsuite/25_algorithms/remove/constexpr.cc: New. 2491 * testsuite/25_algorithms/remove_copy/constexpr.cc: New. 2492 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New. 2493 * testsuite/25_algorithms/remove_if/constexpr.cc: New. 2494 * testsuite/25_algorithms/replace_copy/constexpr.cc: New. 2495 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New. 2496 * testsuite/25_algorithms/replace_if/constexpr.cc: New. 2497 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New. 2498 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New. 2499 * testsuite/25_algorithms/search/constexpr.cc: New. 2500 * testsuite/25_algorithms/search_n/constexpr.cc: New. 2501 * testsuite/25_algorithms/set_difference/constexpr.cc: New. 2502 * testsuite/25_algorithms/set_intersection/constexpr.cc: New. 2503 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New. 2504 * testsuite/25_algorithms/set_union/constexpr.cc: New. 2505 * testsuite/25_algorithms/transform/constexpr.cc: New. 2506 * testsuite/25_algorithms/unique/constexpr.cc: New. 2507 * testsuite/25_algorithms/unique_copy/constexpr.cc: New. 2508 * testsuite/25_algorithms/upper_bound/constexpr.cc: New. 2509 25102019-07-31 Jonathan Wakely <jwakely@redhat.com> 2511 2512 * include/std/memory (make_obj_using_allocator): Qualify call to 2513 uses_allocator_construction_args. 2514 2515 P0631R4 Math Constants 2516 * include/Makefile.am: Add new header. 2517 * include/Makefile.in: Regenerate. 2518 * include/precompiled/stdc++.h: Include new header. 2519 * include/std/numbers: New header. 2520 * include/std/version (__cpp_lib_math_constants): Define. 2521 * testsuite/26_numerics/numbers/1.cc: New test. 2522 * testsuite/26_numerics/numbers/2.cc: New test. 2523 * testsuite/26_numerics/numbers/3.cc: New test. 2524 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test. 2525 2526 * include/std/bit: Add Doxygen comments. 2527 2528 PR libstdc++/91308 2529 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove 2530 constraints on deleter that should only apply to the constructor. 2531 (unique_ptr<T[], D>::__safe_conversion_up): Likewise. 2532 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore 2533 constraints on deleter here. 2534 * testsuite/20_util/unique_ptr/assign/91308.cc: New test. 2535 25362019-07-29 Jonathan Wakely <jwakely@redhat.com> 2537 2538 PR libstdc++/51333 2539 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define 2540 constructor inline. 2541 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define 2542 constructor. 2543 * testsuite/18_support/51333.cc: New test. 2544 25452019-07-28 Gerald Pfeifer <gerald@pfeifer.com> 2546 2547 * doc/xml/manual/documentation_hacking.xml: Fix broken reference 2548 to the Doxygen manual. Avoid a "here" link on the way. 2549 Fix another broken link to Doxygen docblocks. 2550 25512019-07-26 Jonathan Wakely <jwakely@redhat.com> 2552 2553 * include/std/bit (__cpp_lib_endian): Define. 2554 * include/std/version (__cpp_lib_endian): Define. 2555 * testsuite/26_numerics/endian/2.cc: New. 2556 * testsuite/26_numerics/endian/3.cc: New. 2557 * testsuite/26_numerics/endian/4.cc: New. 2558 25592019-07-26 François Dumont <fdumont@gcc.gnu.org> 2560 2561 * testsuite/util/testsuite_iterators.h 2562 (bidirectional_iterator_wrapper): Fix type comment. 2563 (random_access_iterator_wrapper): Likewise. 2564 25652019-07-25 Jonathan Wakely <jwakely@redhat.com> 2566 2567 * include/std/bit (endian): Move definition here as per P1612R1. 2568 * include/std/type_traits (endian): Remove definition from here. 2569 * testsuite/20_util/endian/1.cc: Rename to ... 2570 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header. 2571 25722019-07-25 Martin Liska <mliska@suse.cz> 2573 Dominik Infuhr <dominik.infuehr@theobroma-systems.com> 2574 2575 PR c++/23383 2576 * testsuite/ext/bitmap_allocator/check_delete.cc: Add 2577 -fno-allocation-dce. 2578 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise. 2579 * testsuite/ext/new_allocator/check_delete.cc: Likewise. 2580 * testsuite/ext/new_allocator/check_new.cc: Likewise. 2581 25822019-07-22 Jonathan Wakely <jwakely@redhat.com> 2583 2584 * testsuite/26_numerics/bit/bitops.count/*: Rename to ... 2585 * testsuite/26_numerics/bit/bit.count/*: Here. 2586 2587 * include/std/bit (__rotl, __rotr): Change second parameter from 2588 unsigned int to int and handle negative values. 2589 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second 2590 parameter from unsigned int to int. Add nodiscard attribute. 2591 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ... 2592 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative 2593 shifts. 2594 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ... 2595 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative 2596 shifts. 2597 2598 * include/std/bit (__ceil2): Make unrepresentable results undefined, 2599 as per P1355R2. Add debug assertion. Perform one left shift, not two, 2600 so that out of range values cause undefined behaviour. Ensure that 2601 shift will still be undefined if left operand is promoted. 2602 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for 2603 unrepresentable values with checks that they are not core constant 2604 expressions. 2605 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test. 2606 26072019-07-19 François Dumont <fdumont@gcc.gnu.org> 2608 2609 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix 2610 sized deallocation size computation. 2611 26122019-07-19 Andreas Schwab <schwab@linux-m68k.org> 2613 2614 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update. 2615 26162019-07-18 François Dumont <fdumont@gcc.gnu.org> 2617 2618 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New. 2619 (~_Temporary_buffer()): Use latter. 2620 (_Temporary_buffer(_FIterator, size_type)): Likewise. 2621 26222019-07-17 Andreas Schwab <schwab@suse.de> 2623 2624 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update. 2625 26262019-07-16 Jason Merrill <jason@redhat.com> 2627 2628 * include/std/memory (uses_allocator_construction_args): Add parens 2629 around constraint. 2630 26312019-07-12 Jonathan Wakely <jwakely@redhat.com> 2632 2633 * testsuite/29_atomics/atomic_float/1.cc: Fix comment. 2634 2635 * include/experimental/string_view (__detail::__idt): Remove. 2636 (operator==, operator!=, operator<, operator>, operator<=, operator>=): 2637 Use __type_identity_t instead of __detail::__idt; 2638 * include/std/string_view (__detail::__idt): Remove. 2639 (operator==, operator!=, operator<, operator>, operator<=, operator>=): 2640 Use __type_identity_t instead of __detail::__idt; 2641 * include/std/type_traits (__type_identity_t): New alias template. 2642 2643 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref 2644 and floating point atomics. 2645 26462019-07-11 Jonathan Wakely <jwakely@redhat.com> 2647 2648 * doc/xml/manual/configure.xml: Improve documentation of 2649 --enable-libstdcxx-time option. 2650 2651 * include/bits/atomic_base.h (__atomic_impl): New namespace for 2652 wrappers around atomic built-ins. 2653 (__atomic_float, __atomic_ref): New class templates for use as base 2654 classes. 2655 * include/std/atomic (atomic<float>, atomic<double>) 2656 (atomic<long double>): New explicit specializations. 2657 (atomic_ref): New class template. 2658 (__cpp_lib_atomic_ref): Define. 2659 * include/std/version (__cpp_lib_atomic_ref): Define. 2660 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error. 2661 * testsuite/29_atomics/atomic_float/1.cc: New test. 2662 * testsuite/29_atomics/atomic_float/requirements.cc: New test. 2663 * testsuite/29_atomics/atomic_ref/deduction.cc: New test. 2664 * testsuite/29_atomics/atomic_ref/float.cc: New test. 2665 * testsuite/29_atomics/atomic_ref/generic.cc: New test. 2666 * testsuite/29_atomics/atomic_ref/integral.cc: New test. 2667 * testsuite/29_atomics/atomic_ref/pointer.cc: New test. 2668 * testsuite/29_atomics/atomic_ref/requirements.cc: New test. 2669 26702019-07-06 Jonathan Wakely <jwakely@redhat.com> 2671 2672 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace 2673 throw() with _GLIBCXX_NOTHROW. 2674 (__atomic_add_dispatch): Return after performing atomic increment. 2675 26762019-07-05 Jonathan Wakely <jwakely@redhat.com> 2677 2678 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add) 2679 (__exchange_and_add): Replace static specifier with always_inline 2680 attribute. 2681 (__exchange_and_add_single, __atomic_add_single): Likewise. 2682 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also 2683 combine !__gthread_active_p() and !__GTHREADS branches. 2684 26852019-07-03 Jonathan Wakely <jwakely@redhat.com> 2686 2687 PR libstdc++/91067 2688 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0. 2689 * configure: Regenerate. 2690 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export 2691 missing symbols. 2692 * testsuite/27_io/filesystem/iterators/91067.cc: New test. 2693 * testsuite/util/testsuite_abi.cc: Add new symbol version. 2694 26952019-07-02 Jonathan Wakely <jwakely@redhat.com> 2696 2697 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER) 2698 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin 2699 instead of __is_identifier to detect Clang support. 2700 27012019-07-02 Jim Wilson <jimw@sifive.com> 2702 2703 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc, 2704 and xmllint. 2705 * configure: Regenerate. 2706 27072019-06-27 Jonathan Wakely <jwakely@redhat.com> 2708 2709 PR libstdc++/91012 2710 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view 2711 for the what_arg parameters. 2712 (filesystem_error::filesystem_error): Pass system_error::what() to 2713 the _Impl constructor. 2714 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that 2715 filesystem_error::what() contains system_error::what(). 2716 27172019-06-26 Jonathan Wakely <jwakely@redhat.com> 2718 2719 * include/std/charconv (chars_format): Define bitmask type. 2720 * testsuite/20_util/to_chars/chars_format.cc: New test. 2721 2722 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of. 2723 * include/std/bit (_If_is_unsigned_integer_type): Remove. 2724 (_If_is_unsigned_integer): Use __is_unsigned_integer. 2725 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte)) 2726 (countl_one(byte), countr_zero(byte), countr_one(byte)) 2727 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte)) 2728 (log2p1(byte)): Remove. 2729 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>. 2730 (__detail::__is_int_to_chars_type): Remove. 2731 (__detail::__integer_to_chars_result_type): Use __is_signed_integer 2732 and __is_unsigned_integer. 2733 * include/std/type_traits (__is_one_of): Move here from <charconv>. 2734 (__is_signed_integer, __is_unsigned_integer): New helpers. 2735 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for 2736 std::byte overload. 2737 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise. 2738 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise. 2739 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise. 2740 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise. 2741 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise. 2742 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise. 2743 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise. 2744 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise. 2745 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise. 2746 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise. 2747 27482019-06-25 Jonathan Wakely <jwakely@redhat.com> 2749 2750 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr 2751 function. 2752 27532019-06-25 Jakub Jelinek <jakub@redhat.com> 2754 2755 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN, 2756 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN): 2757 Define to OpenMP 5.0 pragmas even for GCC 10.0+. 2758 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+. 2759 27602019-06-24 Jonathan Wakely <jwakely@redhat.com> 2761 2762 * include/std/numeric (midpoint(T, T)): Change implementation for 2763 floating-point types to avoid incorrect rounding of denormals. 2764 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct 2765 rounding with denormals. 2766 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers. 2767 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise. 2768 2769 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test. 2770 27712019-06-20 Jonathan Wakely <jwakely@redhat.com> 2772 2773 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final 2774 stage of bootstrap. 2775 * configure: Regenerate. 2776 2777 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed): 2778 Qualify calls to __never_valueless. 2779 2780 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to 2781 C++17 working draft. 2782 2783 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic 2784 vector<bool> for test. 2785 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. 2786 27872019-06-19 Jonathan Wakely <jwakely@redhat.com> 2788 2789 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make 2790 private. 2791 (istream_iterator::_M_read()): Do not check stream state before 2792 attempting extraction. Set stream pointer to null when extraction 2793 fails (P0738R2). 2794 (operator==(const istream_iterator&, const istream_iterator&)): Change 2795 to be a hidden friend of istream_iterator. 2796 (operator!=(const istream_iterator&, const istream_iterator&)): 2797 Likewise. 2798 (ostream_iterator::ostream_iterator()): Add default constructor. 2799 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use 2800 addressof. 2801 * testsuite/24_iterators/istream_iterator/1.cc: New test. 2802 * testsuite/24_iterators/ostream_iterator/1.cc: New test. 2803 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check 2804 constructor taking a string. 2805 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc: 2806 New test. 2807 28082019-06-19 Michael Weghorn <m.weghorn@posteo.de> 2809 Jonathan Wakely <jwakely@redhat.com> 2810 2811 PR libstdc++/90945 2812 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use 2813 values of type bool for vector<bool> elements. 2814 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>. 2815 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. 2816 28172019-06-19 Jonathan Wakely <jwakely@redhat.com> 2818 2819 PR libstdc++/90920 partially revert r263433 2820 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges. 2821 (rotate): Remove checks. 2822 * testsuite/25_algorithms/rotate/90920.cc: New test. 2823 2824 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value 2825 category used in invocable check. 2826 (reduce(Iter, Iter, T)): Pass initial value as rvalue. 2827 * testsuite/26_numerics/reduce/2.cc: New test. 2828 28292019-06-18 Jonathan Wakely <jwakely@redhat.com> 2830 2831 * include/bits/algorithmfwd.h: Change title of doc group. 2832 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from 2833 P0024R2. 2834 * include/bits/stl_numeric.h: Define doc group and add algos to it. 2835 * include/std/numeric (__is_random_access_iter): New internal trait. 2836 (reduce, transform_reduce, exclusive_scan, inclusive_scan) 2837 (transform_exclusive_scan, transform_inclusive_scan): Likewise. 2838 * testsuite/25_algorithms/for_each/for_each_n.cc: New test. 2839 * testsuite/26_numerics/exclusive_scan/1.cc: New test. 2840 * testsuite/26_numerics/inclusive_scan/1.cc: New test. 2841 * testsuite/26_numerics/reduce/1.cc: New test. 2842 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test. 2843 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test. 2844 * testsuite/26_numerics/transform_reduce/1.cc: New test. 2845 * testsuite/util/testsuite_iterators.h (test_container::size()): New 2846 member function. 2847 2848 * include/c_global/cstddef (std::byte): Perform arithmetic operations 2849 in unsigned int to avoid promotion (LWG 2950). 2850 28512019-06-17 Jonathan Wakely <jwakely@redhat.com> 2852 2853 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a 2854 failure on AIX. 2855 2856 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201). 2857 2858 PR libstdc++/90281 Fix string conversions for filesystem::path 2859 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: 2860 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use 2861 __str_codecvt_in_all to fail for partial conversions and throw on 2862 error. 2863 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T] 2864 (path::_Cvt<char8_t>): Add explicit specialization. 2865 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove 2866 overloads. 2867 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use 2868 if-constexpr instead of dispatching to _S_wconvert. Use codecvt 2869 instead of codecvt_utf8. Use __str_codecvt_in_all and 2870 __str_codecvt_out_all. 2871 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use 2872 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all. 2873 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use 2874 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values 2875 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code 2876 after converting to UTF-8. 2877 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use 2878 __str_codecvt_in_all. 2879 (path::string): Fix initialization of string types with different 2880 allocators. 2881 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use 2882 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all. 2883 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and 2884 runtime conditions. 2885 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that 2886 return false for partial conversions. 2887 * include/experimental/bits/fs_path.h (u8path): 2888 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw. 2889 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add 2890 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16 2891 instead of codecvt_utf8. Use __str_codecvt_in_all and 2892 __str_codecvt_out_all. 2893 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use 2894 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all. 2895 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use 2896 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values 2897 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all. 2898 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use 2899 __str_codecvt_in_all. 2900 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use 2901 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all. 2902 * src/c++17/fs_path.cc (path::_S_convert_loc): Use 2903 __str_codecvt_in_all. 2904 * src/filesystem/path.cc (path::_S_convert_loc): Likewise. 2905 * testsuite/27_io/filesystem/path/construct/90281.cc: New test. 2906 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test. 2907 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty 2908 strings and with Unicode characters outside the basic multilingual 2909 plane. 2910 * testsuite/27_io/filesystem/path/native/alloc.cc: New test. 2911 * testsuite/experimental/filesystem/path/construct/90281.cc: New test. 2912 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test. 2913 * testsuite/experimental/filesystem/path/native/alloc.cc: New test. 2914 * testsuite/experimental/filesystem/path/native/string.cc: Test with 2915 empty strings and with Unicode characters outside the basic 2916 multilingual plane. 2917 29182019-06-17 François Dumont <fdumont@gcc.gnu.org> 2919 Jonathan Wakely <jwakely@redhat.com> 2920 2921 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type. 2922 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't 2923 deallocate node if insertion fails. 2924 (_Hashtable::_M_insert_multi_node): Likewise. 2925 (_Hashtable::_M_reinsert_node): Pass additional key argument. 2926 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME. 2927 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function. 2928 (_Hashtable::extract(const_iterator)): Use _M_extract_node. 2929 (_Hashtable::extract(const _Key&)): Likewise. 2930 (_Hashtable::_M_merge_unique): Pass additional key argument. 2931 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use 2932 _Scoped_node. 2933 (_Hashtable::_M_insert): Likewise. 2934 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise. 2935 (_Hashtable_alloc): Add comments to functions with misleading names. 2936 29372019-06-17 Jonathan Wakely <jwakely@redhat.com> 2938 2939 * testsuite/20_util/bad_function_call/what.cc: Include <string> header 2940 for std::string. 2941 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. 2942 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory> 2943 header for std::allocator. 2944 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add 2945 using-declaration for std::size_t. 2946 * testsuite/23_containers/array/tuple_interface/tuple_size.cc: 2947 Likewise. 2948 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for 2949 std::istream. 2950 * testsuite/23_containers/vector/cons/55977.cc: Likewise. 2951 * testsuite/experimental/map/erasure.cc: Include <string> for 2952 std::string. 2953 * testsuite/experimental/unordered_map/erasure.cc: Likewise. 2954 29552019-06-14 Jonathan Wakely <jwakely@redhat.com> 2956 2957 * include/experimental/type_traits (experimental::nonesuch): Use 2958 pragma to disable -Wctor-dtor-privacy warnings. 2959 * include/std/type_traits (__is_convertible_helper<From, To, false>) 2960 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise. 2961 2962 * include/std/version (__cpp_lib_bind_front): Add missing macro. 2963 29642019-06-12 Jonathan Wakely <jwakely@redhat.com> 2965 2966 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value. 2967 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise. 2968 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise. 2969 * testsuite/25_algorithms/pstl/feature_test.cc: New test. 2970 2971 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>) 2972 (variant::emplace): Change static_assert messages from "should be" 2973 to "must be". 2974 (hash<monostate>::operator()): Remove name of unused parameter. 2975 2976 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold 2977 expression. 2978 2979 * include/Makefile.am: Add new <bits/charconv.h> header. 2980 * include/Makefile.in: Regenerate. 2981 * include/bits/basic_string.h (to_string(int), to_string(unsigned)) 2982 (to_string(long), to_string(unsigned long), to_string(long long)) 2983 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl. 2984 * include/bits/charconv.h: New header. 2985 (__detail::__to_chars_len): Move here from <charconv>. 2986 (__detail::__to_chars_10_impl): New function extracted from 2987 __detail::__to_chars_10. 2988 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out. 2989 (__to_chars_unsigned_type): New class template that reuses 2990 __make_unsigned_selector_base::__select to pick a type. 2991 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type. 2992 (__detail::__to_chars_len): Move to new header. 2993 (__detail::__to_chars_10): Add inline specifier. Move code doing the 2994 output to __detail::__to_chars_10_impl and call that. 2995 * include/std/version (__cpp_lib_to_chars): Add, but comment out. 2996 * testsuite/21_strings/basic_string/numeric_conversions/char/ 2997 to_string.cc: Fix reference in comment. Remove unused variable. 2998 * testsuite/21_strings/basic_string/numeric_conversions/char/ 2999 to_string_int.cc: New test. 3000 30012019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net> 3002 3003 Fix ConstexprIterator requirements tests - No constexpr algorithms! 3004 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc: 3005 Replace copy with hand-rolled loop. 3006 * testsuite/23_containers/array/requirements/constexpr_iter.cc: 3007 Ditto. 3008 30092019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net> 3010 3011 Test for C++20 p0858 - ConstexprIterator requirements. 3012 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc: 3013 New test. 3014 * testsuite/23_containers/array/requirements/constexpr_iter.cc: 3015 New test. 3016 30172019-06-07 Thomas Rodgers <trodgers@redhat.com> 3018 3019 Rename PSTL macro's consistent with libstdc++ (and llvm upstream 3020 project) standards. 3021 * include/bits/c++config: Rename all macros of the form __PSTL* to 3022 _PSTL*. 3023 * include/std/algorithm: Likewise. 3024 * include/std/execution: Likewise. 3025 * include/std/numeric: Likewise. 3026 * include/std/memory: Likewise. 3027 * include/pstl/glue_memory_impl.h: Likewise. 3028 * include/pstl/numeric_impl.h: Likewise. 3029 * include/pstl/glue_memory_defs.h: Likewise. 3030 * include/pstl/execution_defs.h: Likewise. 3031 * include/pstl/utils.h: Likewise. 3032 * include/pstl/algorithm_fwd.h: Likewise. 3033 * include/pstl/unseq_backend_simd.h: Likewise. 3034 * include/pstl/glue_execution_defs.h: Likewise. 3035 * include/pstl/algorithm_impl.h: Likewise. 3036 * include/pstl/parallel_impl.h: Likewise. 3037 * include/pstl/memory_impl.h: Likewise. 3038 * include/pstl/glue_numeric_defs.h: Likewise. 3039 * include/pstl/parallel_backend_utils.h: Likewise. 3040 * include/pstl/glue_algorithm_defs.h: Likewise. 3041 * include/pstl/parallel_backend.h: Likewise. 3042 * include/pstl/glue_numeric_impl.h: Likewise. 3043 * include/pstl/parallel_backend_tbb.h: Likewise. 3044 * include/pstl/numeric_fwd.h: Likewise. 3045 * include/pstl/glue_algorithm_impl.h: Likewise. 3046 * include/pstl/execution_impl.h: Likewise. 3047 * include/pstl/pstl_config.h: Likewise. 3048 * testsuite/util/pstl/pstl_test_config.h: Likewise. 3049 * testsuite/util/pstl/test_utils.h: Likewise. 3050 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: 3051 Likewise. 3052 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: 3053 Likewise. 3054 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: 3055 Likewise. 3056 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise. 3057 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise. 3058 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise. 3059 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise. 3060 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: 3061 Likewise. 3062 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise. 3063 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise. 3064 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise. 3065 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise. 3066 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: 3067 Likewise. 3068 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise. 3069 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise. 3070 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise. 3071 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise. 3072 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: 3073 Likewise. 3074 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise. 3075 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise. 3076 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: 3077 Likewise. 3078 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: 3079 Likewise. 3080 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise. 3081 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise. 3082 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: 3083 Likewise. 3084 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: 3085 Likewise. 3086 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: 3087 Likewise. 3088 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: 3089 Likewise. 3090 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: 3091 Likewise. 3092 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: 3093 Likewise. 3094 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: 3095 Likewise. 3096 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: 3097 Likewise. 3098 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: 3099 Likewise. 3100 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: 3101 Likewise. 3102 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: 3103 Likewise. 3104 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise. 3105 3106 Rename header guards to be consistent with upstream project's 3107 conventions. 3108 * include/pstl/glue_memory_impl.h: Rename all macros of the form 3109 _PSTL_(.*)_H to _PSTL_\U\1_H. 3110 * include/pstl/numeric_impl.h: Likewise. 3111 * include/pstl/glue_memory_defs.h: Likewise. 3112 * include/pstl/execution_defs.h: Likewise. 3113 * include/pstl/utils.h: Likewise. 3114 * include/pstl/algorithm_fwd.h: Likewise. 3115 * include/pstl/unseq_backend_simd.h: Likewise. 3116 * include/pstl/glue_execution_defs.h: Likewise. 3117 * include/pstl/algorithm_impl.h: Likewise. 3118 * include/pstl/parallel_impl.h: Likewise. 3119 * include/pstl/memory_impl.h: Likewise. 3120 * include/pstl/glue_numeric_defs.h: Likewise. 3121 * include/pstl/parallel_backend_utils.h: Likewise. 3122 * include/pstl/glue_algorithm_defs.h: Likewise. 3123 * include/pstl/parallel_backend.h: Likewise. 3124 * include/pstl/glue_numeric_impl.h: Likewise. 3125 * include/pstl/parallel_backend_tbb.h: Likewise. 3126 * include/pstl/numeric_fwd.h: Likewise. 3127 * include/pstl/glue_algorithm_impl.h: Likewise. 3128 * include/pstl/execution_impl.h: Likewise. 3129 * include/pstl/pstl_config.h: Likewise. 3130 * testsuite/util/pstl/pstl_test_config.h: Likewise. 3131 3132 Synchronize libstdc++ parallel algorithms with upstream 3133 project. 3134 * include/pstl/algorithm_fwd.h: Synchronize with 3135 upstream PSTL project. 3136 * include/pstl/algorithm_impl.h: Likewise. 3137 * include/pstl/execution_defs.h: Likewise. 3138 * include/pstl/execution_impl.h: Likewise. 3139 * include/pstl/glue_algorithm_impl.h: Likewise. 3140 * include/pstl/glue_execution_defs.h: Likewise. 3141 * include/pstl/numeric_fwd.h: Likewise. 3142 * include/pstl/numeric_impl.h: Likewise. 3143 * include/pstl/parallel_backend.h: Likewise. 3144 * include/pstl/pstl_config.h: Likewise. 3145 * include/pstl/unseq_backend_simd.h: Likewise. 3146 * include/pstl/parallel_backend_serial.h: New file. 3147 * include/Makefile.am (pstl_headers): Add 3148 parallel_backend_serial.h. 3149 * include/Makefile.in: Regenerate. 3150 3151 Clean up non-conforming names 3152 * include/pstl/algorithm_impl.h (__parallel_set_union_op): 3153 Uglfiy copy_range1 and copy_range2 3154 (__pattern_walk2_n): Rename local n to __n 3155 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op): 3156 Rename parameter _T to _Tp. 3157 3158 Integrate non-TBB serial backend support 3159 * include/bits/c++config: Adjust TBB detection logic to select serial 3160 PSTL backend if no TBB present. 3161 * testsuite/utils/pstl/test_utils.h: Remove check for 3162 _PSTL_USE_PAR_POLICIES 3163 31642019-06-07 Jonathan Wakely <jwakely@redhat.com> 3165 3166 * testsuite/24_iterators/container_access.cc: Move dg-options before 3167 dg-do directive so the target check uses the -std option. 3168 3169 PR libstdc++/90770 3170 * configure: Regenerate. 3171 * src/Makefile.am (stamp-debug): Also test for missing makefile. 3172 * src/Makefile.in: Regenerate. 3173 31742019-06-06 Jonathan Wakely <jwakely@redhat.com> 3175 3176 * include/std/array: Do not include <stdexcept>. 3177 * include/std/optional: Include <exception> and 3178 <bits/exception_defines.h> instead of <stdexcept>. 3179 * testsuite/20_util/function_objects/searchers.cc: Include <cctype> 3180 for std::isalnum. 3181 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for 3182 std::allocator. 3183 * testsuite/23_containers/map/erasure.cc: Include <string>. 3184 * testsuite/23_containers/unordered_map/erasure.cc: Likewise. 3185 3186 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add 3187 dg-prune-output for different C++98 diagnostic. 3188 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc: 3189 Likewise. 3190 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc: 3191 Likewise. 3192 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: 3193 Likewise. 3194 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: 3195 Likewise. 3196 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: 3197 Likewise. 3198 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: 3199 Likewise. 3200 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: 3201 Likewise. 3202 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: 3203 Likewise. 3204 * testsuite/23_containers/vector/requirements/dr438/ 3205 constructor_1_neg.cc: Likewise. 3206 * testsuite/23_containers/vector/requirements/dr438/ 3207 constructor_2_neg.cc: Likewise. 3208 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: 3209 Likewise. 3210 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98. 3211 3212 * testsuite/23_containers/unordered_map/requirements/debug_container.cc: 3213 Do not test allocator rebinding extension for C++2a. 3214 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change 3215 dg-do directive for C++17 and C++2a. 3216 3217 * testsuite/23_containers/deque/requirements/explicit_instantiation/ 3218 1_c++0x.cc: Remove redundant test. 3219 * testsuite/23_containers/deque/requirements/explicit_instantiation/ 3220 2.cc: Use target selector instead of preprocessor condition. 3221 * testsuite/23_containers/deque/requirements/explicit_instantiation/ 3222 3.cc: Do not run test for C++2a. 3223 * testsuite/23_containers/forward_list/requirements/ 3224 explicit_instantiation/3.cc: Likewise. 3225 * testsuite/23_containers/forward_list/requirements/ 3226 explicit_instantiation/5.cc: Do not test allocator rebinding extension 3227 for C++2a. 3228 * testsuite/23_containers/list/requirements/explicit_instantiation/ 3229 1_c++0x.cc: Remove redundant test. 3230 * testsuite/23_containers/list/requirements/explicit_instantiation/ 3231 2.cc: Use target selector instead of preprocessor condition. 3232 * testsuite/23_containers/list/requirements/explicit_instantiation/ 3233 3.cc: Do not run test for C++2a. 3234 * testsuite/23_containers/list/requirements/explicit_instantiation/ 3235 5.cc: Do not test allocator rebinding extension for C++2a. 3236 * testsuite/23_containers/map/requirements/explicit_instantiation/ 3237 1_c++0x.cc: Remove redundant test. 3238 * testsuite/23_containers/map/requirements/explicit_instantiation/ 3239 2.cc: Adjust comment. 3240 * testsuite/23_containers/map/requirements/explicit_instantiation/ 3241 3.cc: Do not run test for C++2a. 3242 * testsuite/23_containers/map/requirements/explicit_instantiation/ 3243 5.cc: Do not test allocator rebinding extension for C++2a. 3244 * testsuite/23_containers/multimap/requirements/explicit_instantiation/ 3245 1_c++0x.cc: Remove redundant test. 3246 * testsuite/23_containers/multimap/requirements/explicit_instantiation/ 3247 3.cc: Do not run test for C++2a. 3248 * testsuite/23_containers/multimap/requirements/explicit_instantiation/ 3249 5.cc: Do not test allocator rebinding extension for C++2a. 3250 * testsuite/23_containers/multiset/requirements/explicit_instantiation/ 3251 3.cc: Do not run test for C++2a. 3252 * testsuite/23_containers/multiset/requirements/explicit_instantiation/ 3253 5.cc: Do not test allocator rebinding extension for C++2a. 3254 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc: 3255 Do not run test for C++2a. 3256 * testsuite/23_containers/set/requirements/explicit_instantiation/ 3257 1_c++0x.cc: Remove redundant test. 3258 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc: 3259 Do not test allocator rebinding extension for C++2a. 3260 * testsuite/23_containers/unordered_map/requirements/ 3261 explicit_instantiation/3.cc: Likewise. 3262 * testsuite/23_containers/unordered_map/requirements/ 3263 explicit_instantiation/5.cc: Do not test allocator rebinding extension 3264 for C++2a. 3265 * testsuite/23_containers/unordered_multimap/requirements/ 3266 explicit_instantiation/3.cc: Do not run test for C++2a. 3267 * testsuite/23_containers/unordered_multimap/requirements/ 3268 explicit_instantiation/5.cc: Do not test allocator rebinding extension 3269 for C++2a. 3270 * testsuite/23_containers/unordered_multiset/requirements/ 3271 explicit_instantiation/3.cc: Do not run test for C++2a. 3272 * testsuite/23_containers/unordered_multiset/requirements/ 3273 explicit_instantiation/5.cc: Do not test allocator rebinding extension 3274 for C++2a. 3275 * testsuite/23_containers/unordered_set/requirements/ 3276 explicit_instantiation/3.cc: Do not run test for C++2a. 3277 * testsuite/23_containers/unordered_set/requirements/ 3278 explicit_instantiation/5.cc: Do not test allocator rebinding extension 3279 for C++2a. 3280 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/ 3281 2.cc: Remove redundant test. 3282 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/ 3283 3.cc: Do not run test for C++2a. 3284 * testsuite/23_containers/vector/requirements/explicit_instantiation/ 3285 3.cc: Likewise. 3286 3287 * include/std/type_traits (is_empty, is_polymorphic, is_final) 3288 (is_abstract, is_aggregate): Remove static_assert. 3289 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error 3290 from builtin only. 3291 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add 3292 missing -std=gnu++17 option. 3293 * testsuite/20_util/is_empty/incomplete_neg.cc: New test. 3294 * testsuite/20_util/is_final/incomplete_neg.cc: New test. 3295 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error 3296 from builtin only. 3297 3298 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode. 3299 * testsuite/18_support/set_unexpected.cc: Likewise. 3300 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to 3301 void. 3302 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr 3303 function to be valid in C++11. 3304 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode. 3305 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not 3306 include Library Fundamentals or Networking headers in C++11 mode. 3307 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode. 3308 3309 * include/std/tuple (_TC): Replace with _TupleConstraints. 3310 (_TupleConstraints): New helper for SFINAE constraints, with more 3311 expressive member functions to reduce duplication when used. 3312 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove. 3313 (tuple::_TCC): Replace dummy type parameter with bool non-type 3314 parameter that can be used to check the pack size. 3315 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor) 3316 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for 3317 checking constraints in constructors. 3318 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor): 3319 New SFINAE helpers. 3320 (tuple::tuple): Use new helpers to reduce repitition in constraints. 3321 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain. 3322 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor) 3323 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor) 3324 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking 3325 constraints in constructors. 3326 (tuple::__is_alloc_arg()): New SFINAE helpers. 3327 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in 3328 constraints. 3329 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain. 3330 * testsuite/20_util/tuple/cons/90700.cc: New test. 3331 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor 3332 to meet new constraint on allocator-extended default constructor. 3333 33342019-06-03 Jonathan Wakely <jwakely@redhat.com> 3335 3336 * include/bits/stl_map.h (map): Disable static assert for C++98 mode. 3337 * include/bits/stl_multimap.h (multimap): Likewise. 3338 33392019-06-03 François Dumont <fdumont@gcc.gnu.org> 3340 3341 Rename variables and cleanup comments. 3342 * include/bits/hashtable_policy.h 3343 * include/bits/hashtable.h 3344 33452019-06-03 Jonathan Wakely <jwakely@redhat.com> 3346 3347 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2. 3348 Fix bgcolor for P0340R3. 3349 * doc/html/*: Regenerate. 3350 3351 PR libstdc++/90686 3352 * doc/xml/manual/status_cxx2014.xml: Document what's missing from 3353 <experimental/memory_resource>. 3354 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0, 3355 P0339R6, P0340R3, P1164R1 and P1357R1. 3356 * doc/html/*: Regenerate. 3357 3358 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status. 3359 * include/bits/forward_list.h [__cplusplus > 201703]: Enable 3360 allocator::value_type assertion for C++2a. 3361 * include/bits/hashtable.h: Likewise. 3362 * include/bits/stl_deque.h: Likewise. 3363 * include/bits/stl_list.h: Likewise. 3364 * include/bits/stl_map.h: Likewise. 3365 * include/bits/stl_multimap.h: Likewise. 3366 * include/bits/stl_multiset.h: Likewise. 3367 * include/bits/stl_set.h: Likewise. 3368 * include/bits/stl_vector.h: Likewise. 3369 * testsuite/23_containers/deque/48101-3_neg.cc: New test. 3370 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test. 3371 * testsuite/23_containers/list/48101-3_neg.cc: New test. 3372 * testsuite/23_containers/map/48101-3_neg.cc: New test. 3373 * testsuite/23_containers/multimap/48101-3_neg.cc: New test. 3374 * testsuite/23_containers/multiset/48101-3_neg.cc: New test. 3375 * testsuite/23_containers/set/48101-3_neg.cc: New test. 3376 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test. 3377 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test. 3378 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test. 3379 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test. 3380 * testsuite/23_containers/vector/48101-3_neg.cc: New test. 3381 33822019-05-31 Gerald Pfeifer <gerald@pfeifer.com> 3383 3384 * doc/xml/manual/allocator.xml: Move hoard.org back to http. 3385 33862019-05-31 Jonathan Wakely <jwakely@redhat.com> 3387 3388 * include/std/tuple (tuple<>): Add noexcept to allocator-extended 3389 constructors. 3390 (tuple<T1, T2>::__nothrow_default_constructible()): New helper 3391 function. 3392 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper. 3393 33942019-05-31 Jonathan Wakely <jwakely@redhat.com> 3395 3396 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t. 3397 3398 PR libstdc++/90682 3399 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get 3400 definition of _GLIBCXX_DEFAULT_TERM_HANDLER. 3401 * libsupc++/eh_term_handler.h: New header defining 3402 _GLIBCXX_DEFAULT_TERM_HANDLER. 3403 * libsupc++/eh_terminate.cc: Include eh_term_handler.h. 3404 (set_terminate): Restore default handler when argument is null. 3405 (set_unexpected): Likewise. 3406 * testsuite/18_support/set_terminate.cc: New test. 3407 * testsuite/18_support/set_unexpected.cc: New test. 3408 3409 * include/backward/hashtable.h (size_t, ptrdiff_t) 3410 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy) 3411 (distance, vector, pair, __iterator_category): Remove 3412 using-declarations that add these names to namespace __gnu_cxx. 3413 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise. 3414 * include/ext/debug_allocator.h (size_t): Likewise. 3415 * include/ext/functional (size_t, unary_function, binary_function) 3416 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t): 3417 Likewise. 3418 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise. 3419 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise. 3420 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise. 3421 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise. 3422 * include/ext/numeric (iota): Fix outdated comment. 3423 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise. 3424 * include/ext/rb_tree (_Rb_tree, allocator): Likewise. 3425 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise. 3426 * include/ext/ropeimpl.h (size_t, printf, basic_ostream) 3427 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a): 3428 Likewise. 3429 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy) 3430 (allocator, __true_type, __false_type): Likewise. 3431 34322019-05-31 Antony Polukhin <antoshkka@gmail.com> 3433 3434 PR libstdc++/71579 3435 * include/std/type_traits __type_identity, __is_complete_or_unbounded): 3436 New helpers for checking preconditions in traits. 3437 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod) 3438 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract) 3439 (is_destructible, is_nothrow_destructible, is_constructible) 3440 (is_default_constructible, is_copy_constructible) 3441 (is_move_constructible, is_nothrow_default_constructible) 3442 (is_nothrow_constructible, is_nothrow_copy_constructible) 3443 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable) 3444 (is_nothrow_assignable, is_nothrow_copy_assignable) 3445 (is_nothrow_move_assignable, is_trivially_constructible) 3446 (is_trivially_copy_constructible, is_trivially_move_constructible) 3447 is_trivially_assignable, is_trivially_copy_assignable) 3448 (is_trivially_move_assignable, is_trivially_destructible) 3449 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable) 3450 (is_invocable_r, is_nothrow_invocable) 3451 (has_unique_object_representations, is_aggregate): Add static_asserts 3452 to make sure that type traits are not misused with incomplete types. 3453 (__is_constructible_impl, __is_nothrow_default_constructible_impl) 3454 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New 3455 base characteristics without assertions that can be reused in other 3456 traits. 3457 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test. 3458 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New 3459 test. 3460 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test. 3461 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test. 3462 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test. 3463 * testsuite/20_util/is_class/value.cc: Check incomplete type. 3464 * testsuite/20_util/is_function/value.cc: Likewise. 3465 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test. 3466 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New 3467 test. 3468 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test. 3469 * testsuite/20_util/is_reference/value.cc: Check incomplete types. 3470 * testsuite/20_util/is_unbounded_array/value.cc: Likewise. 3471 * testsuite/20_util/is_union/value.cc: Likewise. 3472 * testsuite/20_util/is_void/value.cc: Likewise. 3473 * testsuite/util/testsuite_tr1.h: Add incomplete union type. 3474 34752019-05-31 Jonathan Wakely <jwakely@redhat.com> 3476 3477 * include/bits/random.h (random_device::_M_init(const char*, size_t)): 3478 Add new private member function. 3479 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&)) 3480 (random_device::_M_init_pretr1(const string&)): Call new private 3481 member with string data. 3482 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)): 3483 Define. 3484 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New 3485 test using COW strings. 3486 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate 3487 a value from the device. 3488 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise. 3489 Fix typo in token string. 3490 34912019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com> 3492 3493 LWG2788 basic_string spurious use of a default constructible allocator 3494 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI] 3495 (basic_string::_M_replace_dispatch): Construct temporary string with 3496 the current allocator. 3497 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New. 3498 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New. 3499 35002019-05-30 Jonathan Wakely <jwakely@redhat.com> 3501 3502 * doc/xml/manual/diagnostics.xml: Update list of headers that define 3503 exception classes. 3504 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite 3505 section about new/delete overloads. Improve section on verbose 3506 terminate handler. 3507 * doc/html/*: Regenerate. 3508 3509 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for 3510 P0811R3. Change status of P1353R0. 3511 * doc/html/*: Regenerate. 3512 3513 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for 3514 documentation of implementation-defined types for [thread.req.native]. 3515 * doc/xml/manual/status_cxx2017.xml: Update documentation of 3516 implementation-defined strings for [variant.bad.access]. Fix typo in 3517 documentation of implementation-defined support for [fs.conform.9945]. 3518 * doc/html/*: Regenerate. 3519 35202019-05-29 Jonathan Wakely <jwakely@redhat.com> 3521 3522 PR libstdc++/85494 3523 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test 3524 that fails on mingw-w64. 3525 3526 PR libstdc++/88881 3527 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS] 3528 (status(const path&, error_code&)): Use parent_path() to remove 3529 trailing slash. 3530 (symlink_status(const path&, error_code&)): Duplicate workaround for 3531 bug in _wstat for paths with trailing slash. 3532 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path 3533 with trailing slash. 3534 * testsuite/27_io/filesystem/operations/status.cc: Likewise. 3535 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise. 3536 3537 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at 3538 once instead of building it iteratively. 3539 3540 * testsuite/util/testsuite_api.h: Remove names of unused parameters. 3541 3542 PR libstdc++/85494 use rdseed and rand_s in std::random_device 3543 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if 3544 the assembler supports rdseed. 3545 * config.h.in: Regenerate. 3546 * configure: Regenerate. 3547 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED. 3548 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define. 3549 * doc/html/*: Regenerate. 3550 * doc/xml/manual/status_cxx2011.xml: Document new tokens. 3551 * include/bits/random.h (random_device::random_device()): Always call 3552 _M_init rather than _M_init_pretr1. 3553 (random_device::random_device(const string&)): Likewise. 3554 (random_device::operator()()): Always call _M_getval(). 3555 (random_device::_M_file): Replace first member of union with an 3556 anonymous struct, with _M_file as its first member. 3557 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define. 3558 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define. 3559 (USE_MT19937): Define if none of the above are defined. 3560 (USE_POSIX_FILE_IO): Define. 3561 (_M_strtoul): Remove. 3562 [USE_RDSEED] (__x86_rdseed): Define new function. 3563 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function. 3564 (random_device::_M_init(const string&)): Initialize new union members. 3565 Add support for "rdseed" and "rand_s" tokens. Decide what the 3566 "default" token does according to which USE_* macros are defined. 3567 [USE_POSIX_FILE_IO]: Store a file descriptor. 3568 [USE_MT19937]: Forward to _M_init_pretr1 instead. 3569 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline 3570 code from _M_strtoul. 3571 [!USE_MT19937]: Call _M_init, transforming the old default token or 3572 numeric tokens to "default". 3573 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose. 3574 (random_device::_M_getval()): Use new union members to obtain a 3575 random number from the stored function pointer or file descriptor. 3576 [USE_MT19937]: Obtain a value from the mt19937 engine. 3577 (random_device::_M_getval_pretr1()): Call _M_getval(). 3578 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd 3579 instead of fileno. 3580 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed. 3581 * testsuite/26_numerics/random/random_device/85494.cc: New test. 3582 35832019-05-28 Jonathan Wakely <jwakely@redhat.com> 3584 3585 PR libstdc++/90634 3586 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call 3587 _M_split_cmpts() for a path with multiple components. 3588 (path::_S_is_dir_sep()): Add missing 'static' keyword to function. 3589 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of 3590 components and reserve space in vector. Return early when there is 3591 only one component. 3592 * testsuite/27_io/filesystem/path/construct/90634.cc: New test. 3593 * testsuite/experimental/filesystem/path/construct/90634.cc: New test. 3594 3595 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument 3596 form of std::equals for C++11 compatibility. 3597 35982019-05-26 Gerald Pfeifer <gerald@pfeifer.com> 3599 3600 * doc/xml/manual/appendix_contributing.xml: Update pointer to 3601 C++ standard at ansi.org. 3602 36032019-05-24 Jonathan Wakely <jwakely@redhat.com> 3604 3605 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result. 3606 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test 3607 to "run". 3608 3609 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test. 3610 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function. 3611 36122019-05-23 Jonathan Wakely <jwakely@redhat.com> 3613 3614 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific 3615 tests to ... 3616 * testsuite/20_util/function_objects/invoke/3.cc: New test. 3617 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change 3618 "compile" test to "run". 3619 3620 * doc/xml/manual/intro.xml: Document LWG DR 2996 change. 3621 * doc/html/*: Regenerate. 3622 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add 3623 rvalue aliasing constructor. 3624 (static_pointer_cast, const_pointer, dynamic_pointer_cast) 3625 (reinterpret_pointer_cast): Add overloads taking rvalues. 3626 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)): 3627 Add rvalue aliasing constructor. 3628 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to 3629 "run" and check return values as well as types. 3630 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise. 3631 * testsuite/20_util/shared_ptr/casts/rval.cc: New test. 3632 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test. 3633 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return 3634 values. 3635 3636 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change. 3637 * doc/xml/manual/intro.xml: Likewise. 3638 * include/std/future (__create_task_state): Add default arguments 3639 to make providing an allocator optional. 3640 (packaged_task::packaged_task(F&&)): Call __create_task_state directly 3641 instead of delegating to another constructor. 3642 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not 3643 define allocator-extended constructors for C++17 and later. 3644 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for 3645 C++11 and C++14. 3646 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise. 3647 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise. 3648 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise. 3649 36502019-05-23 Hans-Peter Nilsson <hp@axis.com> 3651 3652 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc: 3653 Don't run the libstdc++/83237 part on simulator targets. 3654 36552019-05-23 Jonathan Wakely <jwakely@redhat.com> 3656 3657 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for 3658 P0040R3. 3659 * doc/html/*: Regenerate. 3660 3661 * include/experimental/any (__any_caster): Use RTTI if comparing 3662 addresses fails, to support non-unique addresses in shared libraries. 3663 * include/std/any (__any_caster): Likewise. 3664 3665 PR libstdc++/90220 3666 * include/experimental/any (__any_caster): Constrain to only be 3667 callable for object types. Use remove_cv_t instead of decay_t. 3668 If the type decays or isn't copy constructible, compare the manager 3669 function to a dummy specialization. 3670 (__any_caster): Add overload constrained for non-object types. 3671 (any::_Manager_internal<_Op>): Add dummy specialization. 3672 * testsuite/experimental/any/misc/any_cast.cc: Test function types 3673 and array types. 3674 36752019-05-22 Jonathan Wakely <jwakely@redhat.com> 3676 3677 PR libstdc++/90557 3678 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix 3679 reversed arguments to uninitialized_copy_n. 3680 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source 3681 is unchanged by copy assignment. 3682 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to 3683 compare path components. 3684 3685 PR libstdc++/77691 3686 * include/experimental/memory_resource: Add system header pragma and 3687 do not define anything unless compiled as C++14 or later. 3688 (__resource_adaptor_common::__guaranteed_alignment): Remove. 3689 (__resource_adaptor_imp::do_allocate): If the requested alignment 3690 is a fundamental alignment then either allocate directly from _M_alloc 3691 or call the new _M_allocate function. 3692 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation. 3693 (__resource_adaptor_imp::_M_allocate): New function that uses a copy 3694 of the allocator rebound to a POD type with the specified alignment. 3695 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation. 3696 * testsuite/experimental/memory_resource/new_delete_resource.cc: 3697 Adjust expected allocation sizes. 3698 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove 3699 xfail for Solaris x86. 3700 37012019-05-21 Thomas Rodgers <trodgers@redhat.com> 3702 3703 LWG 3062 - Unnecessary decay_t in is_execution_policy_v 3704 * include/pstl/execution_defs.h (__enable_if_execution_policy): 3705 Use std::__remove_cvref_t when building with GCC. 3706 37072019-05-21 Jonathan Wakely <jwakely@redhat.com> 3708 3709 PR libstdc++/90252 3710 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend): 3711 Use "additional_flags" to pass -ltbb to v3_target_compile command. 3712 Use check_v3_target_prop_cached to cache the result of the test. 3713 3714 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants. 3715 37162019-05-20 Thomas Rodgers <trodgers@redhat.com> 3717 3718 PR libstdc++/90252 3719 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend): 3720 Changed v3_target_compile check from preprocess to executable. 3721 Added "-ltbb" to v3_target_compile flags. 3722 37232019-05-20 Thomas Rodgers <trodgers@redhat.com> 3724 3725 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend): 3726 Add check for Thread Building Blocks 2018 or later. 3727 37282019-05-20 Jonathan Wakely <jwakely@redhat.com> 3729 3730 * testsuite/experimental/names.cc: Only include Networking TS headers 3731 on targets with the necessary Gthreads support. 3732 37332019-05-20 Marek Polacek <polacek@redhat.com> 3734 3735 CWG 2094 - volatile scalars are trivially copyable. 3736 PR c++/85679 3737 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected 3738 result for volatile int. 3739 37402019-05-20 Jonathan Wakely <jwakely@redhat.com> 3741 3742 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris. 3743 * testsuite/experimental/names.cc: Include <experimental/filesystem> 3744 conditionally. 3745 3746 PR c++/90532 Ensure __is_constructible(T[]) is false 3747 * include/std/type_traits (__do_is_default_constructible_impl) 3748 (__is_default_constructible_atom, __is_default_constructible_safe): 3749 Remove. 3750 (is_default_constructible): Use is_constructible. 3751 * testsuite/20_util/is_constructible/value.cc: Check int[] case. 3752 * testsuite/20_util/is_default_constructible/value.cc: Likewise. 3753 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise. 3754 * testsuite/20_util/is_trivially_default_constructible/value.cc: 3755 Likewise. 3756 37572019-05-20 Pádraig Brady <pbrady@fb.com> 3758 3759 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size 3760 to the deallocator with -fsized-deallocation. 3761 37622019-05-20 Jonathan Wakely <jwakely@redhat.com> 3763 3764 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix 3765 test by passing correct alignment to deallocate function. 3766 37672019-05-18 Jonathan Wakely <jwakely@redhat.com> 3768 3769 PR libstdc++/90520 3770 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): 3771 Raise exception if unique_ptr tuple member has unknown structure. 3772 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__): 3773 Adjust worker to support new __uniq_ptr_data base class. Do not 3774 assume field called _M_head_impl is the first tuple element. 3775 37762019-05-17 François Dumont <fdumont@gcc.gnu.org> 3777 3778 * include/bits/stl_deque.h 3779 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind. 3780 (_Deque_base(_Deque_base&&, const allocator_type&)): New. 3781 (_Deque_base::_Deque_impl_data): New. 3782 (_Deque_base::_Deque_impl): Inherit latter. 3783 (_Deque_base::_Deque_impl::_M_swap_data): Move... 3784 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here. 3785 (_Deque_base::_Deque_impl()): Add noexcept qualification. 3786 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New. 3787 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast. 3788 (deque<>::deque()): Default. 3789 (deque<>::deque(deque&&)): Default. 3790 (deque<>::deque(deque&&, const allocator_type&, false_type)): New. 3791 (deque<>::deque(deque&&, const allocator_type&, true_type)): New. 3792 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters. 3793 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use 3794 _M_range_initialize. 3795 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux. 3796 (deque<>::resize(size_type, const value_type&)): Share a single 3797 implementation. 3798 (deque<>::insert<_It>(const_iterator, _It, _It)): Use 3799 _M_range_insert_aux. 3800 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove. 3801 [__cplusplus >= 201103L](_M_assign_dispatch): Remove. 3802 [__cplusplus >= 201103L](_M_insert_dispatch): Remove. 3803 * testsuite/23_containers/deque/allocator/default_init.cc: New. 3804 38052019-05-17 Jonathan Wakely <jwakely@redhat.com> 3806 3807 PR libstdc++/90246 3808 * include/std/variant (holds_alternative, get, get_if): Improve 3809 static assertion messages. 3810 (bad_variant_access::bad_variant_access()): Change default message. 3811 (__throw_bad_variant_access(bool)): New overload. 3812 (get): Use new overload. 3813 (visit, visit<R>): Improve exception message. 3814 3815 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32 3816 targets. Add more cases from P0608R3. 3817 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3. 3818 3819 * include/bits/random.h (seed_seq::param): Fix non-reserved name. 3820 * include/experimental/type_traits (is_detected_exact) 3821 (is_detected_exact_v): Likewise. 3822 * include/pstl/execution_defs.h (is_execution_policy) 3823 (is_execution_policy_v, __enable_if_execution_policy): Likewise. 3824 * include/pstl/execution_impl.h (__policy_traits): Likewise. 3825 * testsuite/17_intro/names.cc: Check for more non-reserved names. 3826 * testsuite/experimental/names.cc: New test. 3827 3828 PR libstdc++/85965 3829 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static 3830 assertions from the destructor. 3831 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code): 3832 Move static_assert for hash function to here. 3833 (_Hash_table_base::_M_equals): Move static_assert for equality 3834 predicate to here. 3835 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)): 3836 Remove. 3837 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access 3838 the value directly instead of calling _S_value. 3839 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove. 3840 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to 3841 _S_key(_Const_Link_type). 3842 * testsuite/23_containers/set/85965.cc: Check construction, 3843 destruction, assignment and size() do not trigger the assertions. 3844 * testsuite/23_containers/unordered_set/85965.cc: Likewise. 3845 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust 3846 expected errors. 3847 * testsuite/23_containers/multimap/48101_neg.cc: Likewise. 3848 * testsuite/23_containers/multiset/48101_neg.cc: Likewise. 3849 * testsuite/23_containers/set/48101_neg.cc: Likewise. 3850 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise. 3851 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise. 3852 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise. 3853 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise. 3854 3855 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>): 3856 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr 3857 in C++11. 3858 3859 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and 3860 P1165R1 entries. 3861 * doc/html/*: Regenerate. 3862 * include/std/tuple (make_from_tuple): Use remove_reference_t instead 3863 of decay_t (P0777R1). 3864 38652019-05-17 François Dumont <fdumont@gcc.gnu.org> 3866 3867 Move from state of allocators (LWG2593) 3868 * include/bits/stl_deque.h 3869 (_Deque_base(_Deque_base&&, false_type)): Remove. 3870 (_Deque_base(_Deque_base&&, true_type)): Remove. 3871 (_Deque_base(_Deque_base&&)): Adapt. 3872 (_Deque_base::_M_move_impl()): Remove. 3873 * testsuite/util/testsuite_allocator.h 3874 (propagating_allocator(propagating_allocator&&)): Preserve move from 3875 state. 3876 * testsuite/23_containers/deque/allocator/move_assign.cc (test02): 3877 Adapt. 3878 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02): 3879 Adapt. 3880 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt. 3881 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt. 3882 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02): 3883 Adapt. 3884 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02): 3885 Adapt. 3886 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt. 3887 * testsuite/23_containers/unordered_map/allocator/move_assign.cc 3888 (test02): Adapt. 3889 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc 3890 (test02): Adapt. 3891 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc 3892 (test02): Adapt. 3893 * testsuite/23_containers/unordered_set/allocator/move_assign.cc 3894 (test02): Adapt. 3895 * testsuite/23_containers/vector/allocator/move_assign.cc (test02): 3896 Adapt. 3897 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02): 3898 Adapt. 3899 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc 3900 (test02): Adapt. 3901 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc 3902 (test02): Adapt. 3903 39042019-05-16 Jonathan Wakely <jwakely@redhat.com> 3905 3906 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)) 3907 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion. 3908 3909 * include/std/variant (__overload_set): Remove. 3910 (_Arr): New helper. 3911 (_Build_FUN): New class template to define a single FUN overload, 3912 with specializations to prevent unwanted conversions, as per P0608R3. 3913 (_Build_FUNs): New class template to build an overload set of FUN. 3914 (_FUN_type): New alias template to perform overload resolution. 3915 (__accepted_type): Use integer_constant base for failure case. Use 3916 _FUN_type for successful case. 3917 (variant::__accepted_index): Use _Tp instead of _Tp&&. 3918 (variant::variant(_Tp&&)): Likewise. 3919 (variant::operator=(_Tp&&)): Likewise. 3920 3921 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset): 3922 Replace raw visitation with a runtime check for the valueless state 3923 and a non-raw visitor. 3924 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove. 3925 (variant::index()): Remove branch. 3926 (variant::swap(variant&)): Use valueless_by_exception() instead of 3927 comparing the index to variant_npos, and add likelihood attribute. 3928 3929 * include/bits/hashtable_policy.h (_Equal_helper): Remove. 3930 (_Hashtable_base::_Equal_hash_code): Define new class template. 3931 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of 3932 _Equal_helper. 3933 3934 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get): 3935 Replace with _M_get non-static member function. 3936 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static 3937 member function. 3938 (_Hash_code_base, _Local_iterator_base, _Hashtable_base): 3939 (_Hashtable_alloc): Adjust to use non-static members of EBO helper. 3940 3941 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use 3942 _S_get accessors for members in EBO helpers. 3943 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash()) 3944 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const 3945 overloads. 3946 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO 3947 helpers. 3948 (_Hashtable_base::_M_eq()): Remove non-const overload. 3949 39502019-05-15 Jonathan Wakely <jwakely@redhat.com> 3951 3952 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit. 3953 39542019-05-14 Jonathan Wakely <jwakely@redhat.com> 3955 3956 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool): 3957 Fix return value. 3958 39592019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 3960 3961 * config/os/solaris/solaris2.10: Move to ... 3962 * config/os/solaris: ... this. 3963 * configure.host (os_include_dir): Adapt. 3964 (abi_baseline_pair): Remove Solaris 10 handling. 3965 * config/abi/post/i386-solaris2.10: Remove. 3966 * config/abi/post/sparc-solaris2.10: Remove. 3967 * config/abi/post/i386-solaris2.11: Rename to ... 3968 * config/abi/post/i386-solaris: ... this. 3969 * config/abi/post/sparc-solaris2.11: Rename to ... 3970 * config/abi/post/sparc-solaris: ... this. 3971 3972 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove 3973 workaround. 3974 3975 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10 3976 xfail. 3977 39782019-05-14 Jonathan Wakely <jwakely@redhat.com> 3979 3980 * include/std/variant (__visit_with_index): Remove typedef. 3981 (__deduce_visit_result): New tag type. 3982 (__raw_visit, __raw_idx_visit): New helper functions for "raw" 3983 visitation of possibly-valueless variants, forwarding to __do_visit 3984 with the relevant tag type. 3985 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit 3986 and make lambda return void. 3987 (__variant_construct): Likewise. 3988 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use 3989 __raw_idx_visit and make lambda return void. 3990 (_Multi_array::__untag_result): Add metafunction to check the function 3991 pointer type for a tag type that dictates the kind of visitation. 3992 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>): 3993 Use decltype(auto) instead of tagged function pointer type. 3994 (__gen_vtable_impl): Remove bool non-type parameter and unused 3995 _Variant_tuple parameter. 3996 (__gen_vtable_impl::__visit_invoke_impl): Remove. 3997 (__gen_vtable_impl::__do_visit_invoke): Remove. 3998 (__gen_vtable_impl::__do_visit_invoke_r): Remove. 3999 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r 4000 for the visit<R> case, rather than dispatching to separate functions. 4001 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make 4002 lambda return void. 4003 (variant::swap): Likewise. 4004 (__do_visit): Replace two non-type template parameters with a single 4005 type parameter, so that the caller must specify the visitor's return 4006 type (or one of the tag types). 4007 (visit): Deduce a return type from the visitor and use the 4008 __deduce_visit_result tag to enforce that all overloads return the 4009 same type. 4010 (visit<R>): Call __do_visit<R> with explicit result type. 4011 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make 4012 lambda return void. 4013 40142019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com> 4015 4016 nonesuch is insufficiently useless (lwg2996) 4017 * include/std/type_traits (struct __nonesuch): Added private base 4018 class to make __nonesuch not an aggregate and removed deleted default 4019 constructor. 4020 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed. 4021 (operator=(const pair&)): Use __nonesuch instead of 4022 __nonesuch_no_braces. 4023 (operator=(pair&&)): Likewise 4024 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead 4025 of __nonesuch_no_braces. 4026 (operator=(tuple&&)): Likewise 4027 * include/experimental/type_traits (struct nonesuch): Added private 4028 base class to make nonesuch not an aggregate and removed deleted 4029 default constructor. 4030 * testsuite/20_util/nonesuch/nonesuch.cc: New. 4031 * testsuite/experimental/type_traits/nonesuch.cc: New. 4032 40332019-05-14 Jonathan Wakely <jwakely@redhat.com> 4034 4035 * include/bits/std_function.h (_Simple_type_wrapper): Remove. 4036 (_Function_handler): Remove partial specializations for void return 4037 types and pointers to member. 4038 (_Function_handler::_M_manager): Adapt to removal of 4039 _Simple_type_wrapper. 4040 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke. 4041 * include/std/functional (_Bind_result::__enable_if_void) 4042 (_Bind_result::__disable_if_void): Remove sfinae helpers. 4043 (_Bind_result::__call): Use __invoke_r and remove overloads for void 4044 return types. 4045 * include/std/future (__future_base::_Task_state::_M_run) 4046 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and 4047 change return type of lambda expressions. 4048 4049 * include/bits/invoke.h (__invoke_r): Define new function implementing 4050 the INVOKE<R> pseudo-function. 4051 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests. 4052 * testsuite/20_util/function_objects/invoke/2.cc: New test. 4053 4054 * include/std/type_traits (__is_nt_convertible_helper): Define it 4055 unconditionally, not only for C++20. 4056 (__is_nothrow_convertible): Define internal trait for use in C++11. 4057 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible. 4058 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter. 4059 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test. 4060 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type 4061 that has nothrow explicit conversion but potentially-throwing implicit 4062 conversion. 4063 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise. 4064 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper 4065 function to only consider implicit conversions. 4066 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment. 4067 4068 * include/std/iterator: Include <iosfwd> instead of <istream> and 4069 <ostream>. 4070 4071 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)): 4072 Remove unused, non-standard function. 4073 4074 * include/bits/regex.h (match_results::max_size()): Adjust return 4075 value to account for prefix/suffix/unmatched subs. 4076 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to 4077 reset the contained sub matches. 4078 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member 4079 function to set result state following a failed match. 4080 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set 4081 sub_match states after _M_resize. Use _M_establish_failed_match. 4082 4083 PR libstdc++/69724 4084 * include/std/thread (thread::_State_impl, thread::_S_make_state): 4085 Replace single _Callable parameter with variadic _Args pack, to 4086 forward them directly to the tuple of decayed copies. 4087 * testsuite/30_threads/thread/cons/69724.cc: New test. 4088 40892019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com> 4090 4091 Inconsistency wrt Allocators in basic_string assignment (LWG2579) 4092 * include/bits/basic_string.h: (operator=(const basic_string&): 4093 Move allocator decision to assign. 4094 (assign(const basic_string&)): Move allocator decision here. 4095 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc: 4096 Add tests. 4097 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc: 4098 Add tests. 4099 41002019-05-14 Jonathan Wakely <jwakely@redhat.com> 4101 4102 * testsuite/util/testsuite_allocator.h (memory_resource) 4103 (default_resource_mgr): Fix indentation. 4104 4105 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc: 4106 Use operator-> to access raw pointer member. 4107 * testsuite/23_containers/vector/59829.cc: Likewise. 4108 * testsuite/23_containers/vector/bool/80893.cc: Likewise. 4109 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer. 4110 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility 4111 for tests. 4112 (PointerBase, PointerBase_void): Derive from NullablePointer and use 4113 its constructors and equality operators. Change converting 4114 constructors to use operator-> to access private member of the other 4115 pointer type. 4116 (PointerBase_void::operator->()): Add, for access to private member. 4117 (operator-(PointerBase, PointerBase)): Change to hidden friend. 4118 (operator==(PointerBase, PointerBase)): Remove. 4119 (operator!=(PointerBase, PointerBase)): Remove. 4120 4121 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do 4122 not assume field called _M_head_impl is the first tuple element. 4123 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple 4124 implementation more accurate. 4125 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with 4126 empty pointer type and non-empty deleter. 4127 4128 LWG 2899 - Make is_move_constructible correct for unique_ptr 4129 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor, 4130 move assignment operator. 4131 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add. 4132 (__uniq_ptr_data): New class template with conditionally deleted 4133 special members. 4134 (unique_ptr, unique_ptr<T[], D>): Change type of data member from 4135 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move 4136 constructor and move assignment operator as defaulted. 4137 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to 4138 __uniq_ptr_impl::release(). 4139 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward 4140 to __uniq_ptr_impl::reset(pointer). 4141 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): 4142 Check for new __uniq_ptr_data type. 4143 * testsuite/20_util/unique_ptr/dr2899.cc: New test. 4144 41452019-05-13 Jonathan Wakely <jwakely@redhat.com> 4146 4147 PR libstdc++/90454.cc path construction from void* 4148 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that 4149 pointers to void are rejected as well as void. 4150 * include/experimental/bits/fs_path.h (path::_Path): Likewise. 4151 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check 4152 pointers to void. 4153 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise. 4154 4155 * doc/xml/manual/policy_data_structures.xml: Comment out stray 4156 <remark> elements. Fix formatting of bibliography references. 4157 41582019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net> 4159 4160 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status. 4161 41622019-05-13 Jonathan Wakely <jwakely@redhat.com> 4163 4164 Remove Profile Mode, deprecated since 7.1.0 4165 * doc/Makefile.am: Remove XML file for profile mode docs. 4166 * doc/Makefile.in: Regenerate. 4167 * doc/xml/authors.xml: Remove authors of profile mode docs. 4168 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile 4169 mode. 4170 * doc/xml/manual/debug.xml: Likewise. 4171 * doc/xml/manual/evolution.xml: Document removal of profile mode. 4172 * doc/xml/manual/profile_mode.xml: Remove profile mode docs. 4173 * doc/xml/manual/spine.xml: Remove profile mode author credit. 4174 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode 4175 directive. 4176 * doc/xml/manual/using.xml: Remove docs for profile mode headers and 4177 macro. 4178 * doc/html/*: Regenerate. 4179 * include/Makefile.am: Remove profile mode headers. 4180 * include/Makefile.in: Regenerate. 4181 * include/bits/c++config (std::__profile): Remove namespace. 4182 [_GLIBCXX_PROFILE]: Remove checks for macro. 4183 * include/profile/array: Remove. 4184 * include/profile/base.h: Remove. 4185 * include/profile/bitset: Remove. 4186 * include/profile/deque: Remove. 4187 * include/profile/forward_list: Remove. 4188 * include/profile/impl/profiler.h: Remove. 4189 * include/profile/impl/profiler_algos.h: Remove. 4190 * include/profile/impl/profiler_container_size.h: Remove. 4191 * include/profile/impl/profiler_hash_func.h: Remove. 4192 * include/profile/impl/profiler_hashtable_size.h: Remove. 4193 * include/profile/impl/profiler_list_to_slist.h: Remove. 4194 * include/profile/impl/profiler_list_to_vector.h: Remove. 4195 * include/profile/impl/profiler_map_to_unordered_map.h: Remove. 4196 * include/profile/impl/profiler_node.h: Remove. 4197 * include/profile/impl/profiler_state.h: Remove. 4198 * include/profile/impl/profiler_trace.h: Remove. 4199 * include/profile/impl/profiler_vector_size.h: Remove. 4200 * include/profile/impl/profiler_vector_to_list.h: Remove. 4201 * include/profile/iterator_tracker.h: Remove. 4202 * include/profile/list: Remove. 4203 * include/profile/map: Remove. 4204 * include/profile/map.h: Remove. 4205 * include/profile/multimap.h: Remove. 4206 * include/profile/multiset.h: Remove. 4207 * include/profile/ordered_base.h: Remove. 4208 * include/profile/set: Remove. 4209 * include/profile/set.h: Remove. 4210 * include/profile/unordered_base.h: Remove. 4211 * include/profile/unordered_map: Remove. 4212 * include/profile/unordered_set: Remove. 4213 * include/profile/vector: Remove. 4214 * scripts/run_doxygen: Do not process profile mode headers. 4215 * testsuite/23_containers/array/element_access/60497.cc: Don't use 4216 profile mode type. 4217 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc: 4218 Remove dg-skip-if for profile mode. 4219 * testsuite/23_containers/forward_list/capacity/1.cc: Remove 4220 preprocessor check for profile mode. 4221 * testsuite/23_containers/list/capacity/29134.cc: Likewise. 4222 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if 4223 for profile mode. 4224 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc: 4225 Likewise. 4226 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise. 4227 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise. 4228 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise. 4229 * testsuite/23_containers/set/modifiers/extract.cc: Likewise. 4230 * testsuite/23_containers/unordered_map/modifiers/extract.cc: 4231 Likewise. 4232 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc: 4233 Likewise. 4234 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc: 4235 Likewise. 4236 * testsuite/23_containers/unordered_set/modifiers/extract.cc: 4237 Likewise. 4238 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove 4239 preprocessor check for profile mode. 4240 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: 4241 Likewise. 4242 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc: 4243 Remove dg-skip-if for profile mode. 4244 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise. 4245 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise. 4246 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise. 4247 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise. 4248 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise. 4249 * testsuite/Makefile.am: Remove profile_flags variable and 4250 * testsuite/Makefile.am: Remove profile_flags variable and 4251 check-profile target. 4252 * testsuite/Makefile.in: Regenerate. 4253 * testsuite/ext/profile/all.cc: Remove. 4254 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove. 4255 * testsuite/ext/profile/profiler_algos.cc: Remove. 4256 * testsuite/ext/profile/replace_new.cc: Remove. 4257 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove 4258 preprocessor check for profile mode. 4259 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise. 4260 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove. 4261 (check_v3_target_normal_mode): Do not check for profile mode macro. 4262 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for 4263 profile mode. 4264 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise. 4265 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise. 4266 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise. 4267 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise. 4268 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise. 4269 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise. 4270 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. 4271 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. 4272 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. 4273 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise. 4274 4275 Remove array_allocator extension, deprecated since 4.9.0 4276 * doc/xml/manual/allocator.xml: Remove documentation for 4277 array_allocator. 4278 * doc/xml/manual/evolution.xml: Document array_allocator removal. 4279 * doc/xml/manual/using.xml: Remove header from documentation. 4280 * include/Makefile.am: Remove <ext/array_allocator.h> header. 4281 * include/Makefile.in: Regenerate. 4282 * include/ext/array_allocator.h: Remove. 4283 * include/precompiled/extc++.h: Do not include removed header. 4284 * testsuite/ext/array_allocator/1.cc: Remove. 4285 * testsuite/ext/array_allocator/2.cc: Remove. 4286 * testsuite/ext/array_allocator/26875.cc: Remove. 4287 * testsuite/ext/array_allocator/3.cc: Remove. 4288 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove. 4289 * testsuite/ext/array_allocator/check_delete.cc: Remove. 4290 * testsuite/ext/array_allocator/check_new.cc: Remove. 4291 * testsuite/ext/array_allocator/variadic_construct.cc: Remove. 4292 * testsuite/ext/headers.cc: Do not include removed header. 4293 42942019-05-11 François Dumont <fdumont@gcc.gnu.org> 4295 4296 * include/bits/stl_bvector.h 4297 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)): 4298 Make hidden friend. 4299 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)): 4300 Likewise. 4301 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)): 4302 Likewise. 4303 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)): 4304 Likewise. 4305 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)): 4306 Likewise. 4307 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)): 4308 Likewise. 4309 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)): 4310 Likewise. 4311 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO 4312 copy elision. 4313 (_Bit_iterator::operator-(difference_type)): Likewise. 4314 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend. 4315 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow 4316 NRVO copy elision. 4317 (_Bit_const_iterator::operator-(difference_type)): Likewise. 4318 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend. 4319 43202019-05-10 Jonathan Wakely <jwakely@redhat.com> 4321 4322 PR libstdc++/81266 4323 * testsuite/util/thread/all.h: Do not use remove_pointer for 4324 std::thread::native_handle_type. 4325 4326 PR libstdc++/90397 4327 * include/std/variant (_Variant_storage<false, Types...>::_M_storage()) 4328 (_Variant_storage<true, Types...>::_M_reset())) 4329 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept. 4330 (__get_storage): Likewise. 4331 (variant): Add noexcept to friend declarations for __get and 4332 __get_storage. 4333 4334 PR libstdc++/90388 4335 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>): 4336 Use _Require for constraints. 4337 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as 4338 per the standard. 4339 (__uniq_ptr_hash): New base class with conditionally-disabled call 4340 operator. 4341 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash. 4342 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line. 4343 * testsuite/20_util/unique_ptr/hash/90388.cc: New test. 4344 4345 * include/bits/shared_ptr.h: Improve docs. 4346 * include/bits/shared_ptr_base.h: Likewise. 4347 * include/bits/stl_uninitialized.h: Likewise. 4348 * include/bits/unique_ptr.h: Likewise. 4349 * libsupc++/new: Likewise. 4350 43512019-05-09 François Dumont <fdumont@gcc.gnu.org> 4352 4353 * include/bits/stl_deque.h 4354 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)): 4355 Make hidden friend. 4356 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)): 4357 Likewise. 4358 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)): 4359 Likewise. 4360 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)): 4361 Likewise. 4362 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)): 4363 Likewise. 4364 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)): 4365 Likewise. 4366 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO 4367 copy elision. 4368 (_Deque_iterator<>::operator-(difference_type)): Likewise. 4369 43702019-05-08 François Dumont <fdumont@gcc.gnu.org> 4371 4372 PR libstdc++/90277 4373 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc 4374 (test01): Reserve for number of insertions to avoid rehash during test. 4375 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc 4376 (test01): Likewise. 4377 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc 4378 (test01): Likewise. 4379 (test02): Likewise. 4380 (test03): Likewise. 4381 43822019-05-08 Jonathan Wakely <jwakely@redhat.com> 4383 4384 * include/experimental/bits/fs_path.h: Improve docs. 4385 * include/experimental/bits/net.h: Fix wrong header name in comment. 4386 Do not document implementation details. 4387 * include/experimental/netfwd: Fix doxygen grouping. 4388 43892019-05-07 Jonathan Wakely <jwakely@redhat.com> 4390 4391 * include/bits/stl_pair.h: Improve docs. 4392 * include/std/tuple: Likewise. 4393 4394 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for 4395 inline namespace. 4396 * include/std/chrono: Improve docs. 4397 * include/std/ratio: Do not document implementation details. 4398 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error 4399 line numbers. 4400 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise. 4401 4402 PR libstdc++/89102 4403 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes. 4404 * include/std/chrono (__duration_common_type_wrapper): Replace with ... 4405 (__duration_common_type): New helper. 4406 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use 4407 __duration_common_type. 4408 (__timepoint_common_type_wrapper): Replace with ... 4409 (__timepoint_common_type): New helper. 4410 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>): 4411 Use __time_point_common_type. 4412 * include/std/type_traits (common_type<>): Define, as per LWG 2408. 4413 (__common_type_impl): If either argument is transformed by decay, 4414 use the common_type of the decayed types. 4415 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already 4416 decayed, use __do_common_type_impl to get the common_type. 4417 (common_type<_Tp>): Use common_type<_Tp, _Tp>. 4418 (__do_member_type_wrapper, __member_type_wrapper) 4419 (__expanded_common_type_wrapper): Remove. 4420 (__common_type_pack, __common_type_fold): New helpers. 4421 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of 4422 __member_type_wrapper and __expanded_common_type_wrapper. 4423 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc: 4424 Test zero-length template argument list. 4425 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc: 4426 Test single argument cases and argument types that should decay. 4427 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc: 4428 Adjust expected error. 4429 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for 4430 dg-error lineno. 4431 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise. 4432 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise. 4433 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise. 4434 4435 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion. 4436 44372019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com> 4438 4439 Make allocator propagation more consistent for 4440 operator+(basic_string) (P1165R1) 4441 * include/bits/basic_string.h 4442 (operator+(basic_string&&, basic_string&&): Changed resulting 4443 allocator to always be the one from the first parameter. 4444 * include/bits/basic_string.tcc 4445 (operator+(const _CharT*, const basic_string&)): Changed 4446 resulting allocator to be SOCCC on the second parameter's allocator. 4447 (operator+(_CharT, const basic_string&)): Likewise. 4448 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc: 4449 New. 4450 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc: 4451 New. 4452 44532019-05-07 Jonathan Wakely <jwakely@redhat.com> 4454 4455 * include/bits/regex.h: Improve docs. 4456 * include/bits/regex.tcc: Do not document implementation details. 4457 4458 * testsuite/19_diagnostics/error_code/hash.cc: New test. 4459 44602019-05-06 François Dumont <fdumont@gcc.gnu.org> 4461 4462 * python/libstdcxx/v6/printers.py (add_one_template_type_printer): 4463 Add type printer for container types in std::__debug namespace. 4464 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New. 4465 (gdb-tests): Use distinct parameters for the type of test and use of 4466 regex. 4467 (gdb-test): Check for regex test even if 'whatis' test. 4468 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG 4469 mode. 4470 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise. 4471 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise. 4472 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise. 4473 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. 4474 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. 4475 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. 4476 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise. 4477 44782019-05-04 Jonathan Wakely <jwakely@redhat.com> 4479 4480 * include/std/system_error (error_category): Fix comment. 4481 4482 PR libstdc++/90299 4483 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the 4484 argument is an empty path. 4485 (absolute(const path&, error_code&)): Use invalid_argument as error 4486 code instead of no_such_file_or_directory. 4487 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling 4488 of non-existent paths and empty paths with both overloads of absolute. 4489 4490 * include/std/system_error (error_category, error_code) 4491 (error_condition): Improve docs. 4492 * libsupc++/exception: Add missing @addtogroup Doxygen command. 4493 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators 4494 to class documentation. Suppress documentation for implementation 4495 details. 4496 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested): 4497 Suppress documentation for implementation details. 4498 4499 * include/std/system_error (error_code): Remove friend declaration 4500 for hash<error_code>. 4501 (hash<error_code>::operator()): Use public member functions to access 4502 value and category. 4503 (hash<error_condition>::operator()): Use address of category, not 4504 its object representation. 4505 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()): 4506 Use public member functions to access value and category. 4507 * testsuite/19_diagnostics/error_condition/hash.cc: New test. 4508 45092019-05-04 François Dumont <fdumont@gcc.gnu.org> 4510 4511 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment. 4512 * include/bits/hashtable_policy.h 4513 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill. 4514 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise. 4515 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not 4516 smaller than input value rather than always greater. Preserve 4517 _M_next_resize if called with 0 input. Use __builtin_floorl. 4518 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of 4519 elements + number of insertions is greater than _M_next_resize. Start 4520 with 11 buckets if not told otherwise. Use __builtin_floorl. 4521 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements. 4522 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt): 4523 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl. 4524 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not 4525 told otherwise. Use __builtin_floorl. 4526 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test 4527 to also validate _Power2_rehash_policy. 4528 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc: 4529 Adapt. 4530 45312019-05-03 Jonathan Wakely <jwakely@redhat.com> 4532 4533 PR libstdc++/61761 4534 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines 4535 std::copysign. 4536 4537 PR libstdc++/52119 4538 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer 4539 overflow warning with -Wpedantic -Wsystem-headers. 4540 45412019-05-02 Jonathan Wakely <jwakely@redhat.com> 4542 4543 PR libstdc++/90314 4544 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro. 4545 * include/bits/move.h (swap): Remove extra parentheses. 4546 4547 * include/experimental/bits/lfts_config.h: Improve doc markup. 4548 * include/experimental/optional: Improve docs. 4549 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof) 4550 (__constexpr_addressof): Remove. 4551 (optional::operator->()): Use std::__addressof(). 4552 * include/std/optional (optional::operator->()): Adjust whitespace. 4553 * testsuite/experimental/optional/constexpr/observers/2.cc: Check 4554 that operator-> is still constexpr with overloaded operator&. Change 4555 to compile-only test. 4556 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to 4557 compile-only test. 4558 4559 * include/bits/shared_ptr.h: Improve docs. 4560 * include/bits/shared_ptr_atomic.h: Likewise. 4561 * include/bits/unique_ptr.h: Likewise. Adjust whitespace. 4562 4563 * include/bits/basic_string.h: Fix iterator/index confusion in 4564 Doxygen comments. 4565 * include/bits/range_access.h: Fix Doxygen warnings. 4566 * include/bits/refwrap.h: Do not document implementation details. 4567 (ref, cref): Group docs with reference_wrapper. 4568 * include/std/fstream: Fix Doxygen markup. 4569 * libsupc++/initializer_list (begin, end): Group docs with 4570 initializer_list. 4571 4572 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES. 4573 4574 * include/bits/unique_lock.h: Fix/improve doxygen markup. 4575 * include/std/mutex: Likewise. 4576 * include/std/shared_mutex: Likewise. 4577 4578 * include/bits/fs_dir.h: Fix/improve doxygen markup. 4579 * include/bits/fs_fwd.h: Likewise. 4580 * include/bits/fs_ops.h: Likewise. 4581 * include/bits/fs_path.h: Likewise. 4582 * include/std/filesystem: Likewise. 4583 4584 * include/experimental/bits/net.h: Fix/improve doxygen markup. 4585 * include/experimental/buffer: Likewise. 4586 * include/experimental/executor: Likewise. 4587 * include/experimental/internet: Likewise. 4588 * include/experimental/io_context: Likewise. 4589 * include/experimental/net: Likewise. 4590 * include/experimental/netfwd: Likewise. 4591 * include/experimental/socket: Likewise. 4592 * include/experimental/timer: Likewise. 4593 4594 * doc/doxygen/doxygroups.cc: Move description of experimental group 4595 here. 4596 * include/experimental/algorithm: Add to libfund-ts doc group. 4597 * include/experimental/any: Likewise. Do not document implementation 4598 details. 4599 * include/experimental/array: Add to libfund-ts doc group. 4600 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group 4601 for Library Fundamentals. 4602 * include/experimental/chrono: Add to libfund-ts doc group. 4603 * include/experimental/deque: Likewise. 4604 * include/experimental/forward_list: Likewise. 4605 * include/experimental/functional: Likewise. 4606 * include/experimental/iterator: Likewise. 4607 * include/experimental/list: Likewise. 4608 * include/experimental/map: Likewise. 4609 * include/experimental/memory: Likewise. 4610 * include/experimental/memory_resource: Likewise. Improve docs. 4611 details. 4612 * include/experimental/numeric: Add to libfund-ts doc group. 4613 * include/experimental/optional: Likewise. 4614 * include/experimental/propagate_const: Likewise. 4615 * include/experimental/random: Likewise. 4616 * include/experimental/ratio: Likewise. 4617 * include/experimental/regex: Likewise. 4618 * include/experimental/set: Likewise. 4619 * include/experimental/source_location: Likewise. 4620 * include/experimental/string: Likewise. 4621 * include/experimental/string_view: Likewise. 4622 * include/experimental/system_error: Likewise. 4623 * include/experimental/tuple: Likewise. 4624 * include/experimental/type_traits: Likewise. 4625 * include/experimental/unordered_map: Likewise. 4626 * include/experimental/unordered_set: Likewise. 4627 * include/experimental/utility: Likewise. 4628 * include/experimental/vector: Likewise. 4629 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error. 4630 * testsuite/experimental/array/neg.cc: Adjust dg-error. 4631 * testsuite/experimental/propagate_const/assignment/move_neg.cc: 4632 Likewise. 4633 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise. 4634 * testsuite/experimental/propagate_const/requirements2.cc: Likewise. 4635 * testsuite/experimental/propagate_const/requirements3.cc: Likewise. 4636 * testsuite/experimental/propagate_const/requirements4.cc: Likewise. 4637 * testsuite/experimental/propagate_const/requirements5.cc: Likewise. 4638 4639 * include/experimental/bits/fs_dir.h: Fix Doxygen markup. 4640 * include/experimental/bits/fs_fwd.h: Improve docs. 4641 * include/experimental/bits/fs_ops.h: fix Doxygen markup. 4642 * include/experimental/bits/fs_path.h: Likewise. 4643 (path, filesystem_error, u8path): Improve docs. 4644 * include/experimental/filesystem: Link to docs for TS. 4645 4646 * config/allocator/new_allocator_base.h (__allocator_base): Add 4647 workaround for Doxygen bug #6945. 4648 * include/std/memory: Improve docs. Define group for pointer safety. 4649 * include/std/scoped_allocator: Improve docs. Use "undocumented" 4650 conditional to suppress documentation for implementation details. 4651 4652 * include/bits/specfun.h: Improve docs. 4653 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions 4654 and namespaces. 4655 4656 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs. 4657 (std::experimental): Add docs. 4658 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11 4659 namespace to nothing when generating docs. 4660 * include/bits/regex_constants.h (std::regex_constants): Improve docs. 4661 * include/std/chrono (std::chrono): Likewise. 4662 * include/std/functional (std::placeholders): Likewise. 4663 * include/std/thread (std::this_thread): Likewise. 4664 4665 * include/parallel/settings.h: Fix Doxygen markup. 4666 4667 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define 4668 anything unless PB_DS_CLASS_C_DEC is defined. 4669 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise. 4670 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise. 4671 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise. 4672 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise. 4673 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise. 4674 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise. 4675 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp: 4676 Likewise. 4677 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise. 4678 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise. 4679 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise. 4680 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise. 4681 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise. 4682 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise. 4683 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise. 4684 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise. 4685 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise. 4686 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise. 4687 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp: 4688 Likewise. 4689 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise. 4690 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp: 4691 Likewise. 4692 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp: 4693 Likewise. 4694 4695 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set 4696 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various 4697 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that 4698 Doxygen expands. 4699 47002019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 4701 4702 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate. 4703 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise. 4704 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise. 4705 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise. 4706 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise. 4707 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt: 4708 Likewise. 4709 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise. 4710 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt: 4711 Likewise. 4712 47132019-05-01 Jonathan Wakely <jwakely@redhat.com> 4714 4715 PR libstdc++/61761 4716 * include/std/complex (__complex_proj): Return parameter unchanged. 4717 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for 4718 floating-point types to take std::complex arguments. 4719 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for 4720 floating-point types. 4721 * testsuite/26_numerics/complex/proj.cc: New test. 4722 47232019-04-30 Jakub Jelinek <jakub@redhat.com> 4724 4725 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports 4726 to _Lock_policyE[012]. 4727 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update. 4728 47292019-04-30 Jonathan Wakely <jwakely@redhat.com> 4730 4731 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove 4732 macros accidentally left in. 4733 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove 4734 unnecessary -lstdc++fs option. Fix test for mingw. 4735 * testsuite/experimental/filesystem/path/native/string-char8_t.cc: 4736 Fix test for mingw. 4737 47382019-04-30 Jakub Jelinek <jakub@redhat.com> 4739 4740 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update. 4741 47422019-04-29 Jonathan Wakely <jwakely@redhat.com> 4743 4744 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment. 4745 4746 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use 4747 _GLIBCXX_NOEXCEPT_IF to simplify declarations. 4748 4749 PR libstdc++/71312 4750 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes. 4751 4752 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard 4753 attribute. 4754 4755 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused 4756 class template and partial specialization. 4757 4758 PR libstdc++/87982 4759 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to 4760 an integral type. 4761 * include/bits/stl_algobase.h (__size_to_integer): New overloaded 4762 functions to convert a value to an integral type. 4763 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type. 4764 (fill_n): Convert _Size parameter to an integral type. 4765 * testsuite/25_algorithms/fill_n/87982.cc: New test. 4766 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test. 4767 * testsuite/25_algorithms/fill_n/dr426.cc: New test. 4768 * testsuite/25_algorithms/generate_n/87982.cc: New test. 4769 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test. 4770 * testsuite/25_algorithms/generate_n/dr426.cc: New test. 4771 47722019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com> 4773 4774 Adding noexcept-specification on tuple constructors (LWG 2899) 4775 * libstdc++-v3/include/std/tuple: 4776 (tuple()): Add noexcept-specification. 4777 (tuple(const _Elements&...)): Likewise 4778 (tuple(_UElements&&...)): Likewise 4779 (tuple(const tuple<_UElements...>&)): Likewise 4780 (tuple(tuple<_UElements...>&&)): Likewise 4781 (tuple(const _T1&, const _T2&)): Likewise 4782 (tuple(_U1&&, _U2&&)): Likewise 4783 (tuple(const tuple<_U1, _U2>&): Likewise 4784 (tuple(tuple<_U1, _U2>&&): Likewise 4785 (tuple(const pair<_U1, _U2>&): Likewise 4786 (tuple(pair<_U1, _U2>&&): Likewise 4787 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New 4788 47892019-04-27 Marc Glisse <marc.glisse@inria.fr> 4790 4791 PR libstdc++/87106 4792 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the 4793 arguments with __restrict. 4794 47952019-04-26 H.J. Lu <hongjiu.lu@intel.com> 4796 4797 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated. 4798 47992019-04-26 Jonathan Wakely <jwakely@redhat.com> 4800 4801 * include/experimental/bits/fs_path.h 4802 (path::_S_convert_loc<_InputIterator>): Create const std::string to 4803 avoid redundant call to _S_convert_loc with non-const pointers. 4804 4805 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test 4806 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1. 4807 * testsuite/21_strings/basic_string/hash/hash.cc 4808 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings. 4809 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc 4810 [!_GLIBCXX_USE_CXX11_ABI]: Likewise. 4811 4812 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches 4813 wstring::_M_replace_dispatch with more specific patterns. 4814 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>): 4815 Create const std::string to avoid redundant call to _S_convert_loc 4816 with non-const pointers. 4817 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to 4818 avoid unnecessary basic_string::assign instantiations. 4819 4820 * include/std/memory (__uses_alloc_args): Add string-literal to 4821 static_assert, to match the one in __uses_alloc. 4822 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept. 4823 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check 4824 for recursive uses-allocator construction of nested pairs. 4825 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add 4826 comment. 4827 48282019-04-26 Jakub Jelinek <jakub@redhat.com> 4829 4830 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update. 4831 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update. 4832 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update. 4833 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update. 4834 4835 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update. 4836 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update. 4837 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update. 4838 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update. 4839 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update. 4840 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update. 4841 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update. 4842 48432019-04-25 Jonathan Wakely <jwakely@redhat.com> 4844 4845 PR libstdc++/90239 4846 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status. 4847 * include/std/scoped_allocator [__cplusplus > 201703L] 4848 (scoped_allocator_adaptor::construct): Define in terms of 4849 uses_allocator_construction_args, as per P0591R4. 4850 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test. 4851 * testsuite/util/testsuite_allocator.h: Remove name of unused 4852 parameter. 4853 48542019-04-24 Jonathan Wakely <jwakely@redhat.com> 4855 4856 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status. 4857 * doc/html/*: Regenerate. 4858 4859 * include/bits/fs_path.h (operator<, operator<=, operator>) 4860 (operator>=, operator==, operator!=): Make hidden friends, as per 4861 LWG 3065. 4862 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix 4863 string type in test. 4864 * testsuite/27_io/filesystem/path/native/string.cc: Likewise. 4865 4866 * include/std/any (any::any(ValueType&&)): Use __and_v. 4867 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)): 4868 Likewise. 4869 4870 * include/std/tuple (apply): Use remove_reference_t instead of decay_t 4871 as per P0777R1. 4872 * include/std/type_traits (__result_of_memfun): Use remove_reference 4873 instead of __remove_cvref_t and remove redundant is_same check. 4874 (__inv_unwrap): Use __remove_cvref_t instead of decay_t. 4875 4876 * include/experimental/string_view (basic_string_view::pointer) 4877 (basic_string_view::reference): Fix to refer to non-const value_type. 4878 * include/bits/basic_string.h (basic_string): Use __sv_check and 4879 __sv_limit instead of basic_string_view::_M_check and 4880 basic_string_view::_M_limit. 4881 * include/std/string_view (__sv_check, __sv_limit): New 4882 helper functions to replace basic_string_view::_M_check and 4883 basic_string_view::_M_limit. 4884 (basic_string_view): Add static assertions to enforce ill-formed 4885 requirement for traits_type::char_type from P1148R0, and to enforce 4886 required properties of char-like types. 4887 (basic_string_view::pointer, basic_string_view::reference): Fix to 4888 refer to non-const value_type. 4889 (basic_string_view::operator[], basic_string_view::at) 4890 (basic_string_view::front, basic_string_view::back) 4891 (basic_string_view::data): Use const_reference and const_pointer 4892 typedefs for return types. 4893 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove. 4894 (hash<wstring_view>): Fix argument_type typedef. 4895 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/ 4896 char/1.cc: Fix expected return type of basic_string_view::data(). 4897 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/ 4898 wchar_t/1.cc: Likewise. 4899 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/ 4900 char/1.cc: Likewise. 4901 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/ 4902 wchar_t/1.cc: Likewise. 4903 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc: 4904 New test. 4905 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc: 4906 Check reference and pointer typedefs. 4907 * testsuite/experimental/string_view/requirements/typedefs.cc: 4908 Likewise. 4909 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc: 4910 Fix expected return type of basic_string_view::data(). 4911 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/ 4912 1.cc: Likewise. 4913 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc: 4914 Likewise. 4915 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/ 4916 1.cc: Likewise. 4917 4918 PR libstdc++/90220 4919 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t. 4920 Avoid a runtime check for types that can never be stored in std::any. 4921 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with 4922 array types. 4923 4924 PR libstdc++/90220 (partial) 4925 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do 4926 not attempt ill-formed static_cast to pointers to non-object types. 4927 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with 4928 function types. 4929 4930 * testsuite/20_util/variant/run.cc: Catch exception by reference to 4931 prevent -Wcatch-value warning. 4932 4933 * include/std/variant (__variant_construct): Use template parameter 4934 type instead of equivalent decltype-specifier. 4935 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)): 4936 Replace forward with move. 4937 (_Move_ctor_base<false, Types...>::_M_destructive_move) 4938 (_Move_ctor_base<false, Types...>::_M_destructive_copy) 4939 (_Move_ctor_base<true, Types...>::_M_destructive_move) 4940 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the 4941 index after construction succeeds. 4942 (_Copy_assign_base<false, Types...>::operator=): Remove redundant 4943 if-constexpr checks that are always true. Use __remove_cvref_t instead 4944 of remove_reference so that is_nothrow_move_constructible check 4945 doesn't use a const rvalue parameter. In the potentially-throwing case 4946 construct a temporary and move assign it, as per LWG 2904. 4947 (_Move_assign_base<false, Types...>::operator=): Remove redundant 4948 if-constexpr checks that are always true. Use emplace as per LWG 2904. 4949 (variant::operator=(T&&)): Only use emplace conditionally, otherwise 4950 construct a temporary and move assign from it, as per LWG 2904. 4951 * testsuite/20_util/variant/exception_safety.cc: Check that 4952 assignment operators have strong exception safety guarantee. 4953 49542019-04-23 Thomas Rodgers <trodgers@redhat.com> 4955 4956 Document PSTL linker flags 4957 4958 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1. 4959 49602019-04-23 Jonathan Wakely <jwakely@redhat.com> 4961 4962 * include/std/variant (__detail::__variant::_Traits): Make 4963 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make 4964 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per 4965 P0602R4. 4966 (__detail::__variant::_Copy_assign_alias): Only depend on 4967 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now. 4968 * testsuite/20_util/variant/compile.cc: Correct checks for trivial 4969 move assignment operators. 4970 4971 PR libstdc++/90165 4972 * include/std/variant (variant::__not_self): New helper for the 4973 is_same_v<remove_cvref_t<T>, variant>==false constraints. 4974 (variant::__to_type_impl): Remove. 4975 (variant::__to_type): Add default argument to check pack size, instead 4976 of using __to_type_impl. 4977 (variant::__accepted_type): Add default argument using __not_self. 4978 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers 4979 for variant(T&&) constructor constraint. 4980 (variant::variant(T&&)): Use __not_in_place_tag in constraints. 4981 Extract __accepted_type into a named template parameter for reuse in 4982 other constraints and in the exception specification. 4983 (variant::variant(in_place_type_t<T>, Args&&...)) 4984 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...)) 4985 (variant::variant(in_place_index_t<T>, Args&&...)) 4986 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...)) 4987 (variant::operator=T&&)): Remove redundant && from trait arguments. 4988 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor 4989 isn't used for in_place_type or in_place_index arguments. 4990 4991 * include/std/type_traits (unwrap_reference_t): Define for C++2a. 4992 (unwrap_ref_decay): Remove inheritance from unwrap_reference. 4993 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias. 4994 49952019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> 4996 Bernd Edlinger <bernd.edlinger@hotmail.de> 4997 Jakub Jelinek <jakub@redhat.com> 4998 4999 PR target/89093 5000 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add 5001 general-regs-only target attribute for ARM. 5002 50032019-04-23 Jonathan Wakely <jwakely@redhat.com> 5004 5005 PR libstdc++/87431 5006 * include/bits/basic_string.h (_Never_valueless_alt): Make partial 5007 specialization also depend on is_nothrow_move_constructible. 5008 * include/std/variant (__detail::__variant::__never_valueless()): 5009 Only true if the variant would have a move assignment operator. 5010 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()): 5011 Check __never_valueless<T...>(). 5012 (variant::emplace): Only perform non-throwing move assignments 5013 for never-valueless alternatives if the variant has a move assignment 5014 operator. 5015 * testsuite/20_util/variant/compile.cc: Check that never-valueless 5016 types can be emplaced into non-assignable variants. 5017 * testsuite/20_util/variant/run.cc: Check that never-valueless types 5018 don't get copied when emplaced into non-assignable variants. 5019 5020 * include/std/variant (__detail::__variant::__ref_cast): Remove 5021 unused function. 5022 (__detail::__variant::_Uninitialized::_M_get) 5023 (__detail::__variant::__get) 5024 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept. 5025 50262019-04-21 Iain Sandoe <iain@sandoe.co.uk> 5027 5028 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8 5029 to Darwin10. 5030 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise. 5031 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise. 5032 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise. 5033 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise. 5034 50352019-04-20 Thomas Rodgers <trodgers@redhat.com> 5036 5037 Delegate PSTL configuration to pstl/pstl_config.h 5038 5039 * include/bits/c++config: Remove explicit PSTL configuration 5040 macros and use definitions from <pstl/pstl_config.h>. 5041 50422019-04-20 Thomas Rodgers <trodgers@redhat.com> 5043 5044 Cleanup algorithm implementations 5045 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward 5046 execution policy. 5047 (mismatch): Forward execution policy. 5048 (equal): Qualify call to std::equal(). 5049 (partial_sort): Forward execution policy. 5050 (inplace_merge): Forward execution policy. 5051 50522019-04-19 Thomas Rodgers <trodgers@redhat.com> 5053 5054 Improve implementation of parallel equal() 5055 * include/pstl/algorithm_impl.h 5056 (__internal::__brick_equal): use "4 iterator" version of 5057 std::equal(). 5058 (__internal::__brick_equal): use simd for random access 5059 iterators on unsequenced execution policies. 5060 (__internal::__pattern_equal): add "4 iterator" version 5061 (__internal::__pattern_equal): dispatch to simd __brick_equal 5062 for vector-only execution policies. 5063 (__internal::__pattern_equal): dispatch to __parallel_or for 5064 parallel execution policies. 5065 * include/pstl/glue_algorithm_impl.h 5066 (std::equal): dispatch to "4 iterator" version of 5067 __internal::__pattern_equal(). 5068 50692019-04-17 Jonathan Wakely <jwakely@redhat.com> 5070 5071 PR libstdc++/90105 5072 * include/bits/forward_list.h (operator==): Do not use operator!= to 5073 compare elements. 5074 (forward_list<T, A>::sort(Comp)): When elements are equal take the one 5075 earlier in the list, so that sort is stable. 5076 * testsuite/23_containers/forward_list/operations/90105.cc: New test. 5077 * testsuite/23_containers/forward_list/comparable.cc: Test with 5078 types that meet the minimum EqualityComparable and LessThanComparable 5079 requirements. Remove irrelevant comment. 5080 5081 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign): 5082 Do not depend on whether all alternative types are move constructible. 5083 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals 5084 from the operand when deciding whether to perform the assignment. 5085 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type 5086 with deleted move constructor and deleted move assignment operator. 5087 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check 5088 behaviour of variants with DeletedMoves as an alternative. 5089 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type. 5090 (move_ctor, move_assign): Check that moving a variant with a 5091 DeletedMoves alternative falls back to copying instead of moving. 5092 5093 * testsuite/20_util/variant/compile.cc: Remove empty string literals 5094 from static_assert declarations. 5095 5096 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to 5097 actually match its name. 5098 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly. 5099 (test_swap()): Fix result for MoveCtorOnly and check 5100 MoveCtorAndSwapOnly. 5101 5102 * include/std/optional (optional::value_or(U&&) &&): Add missing 5103 constexpr specifier. 5104 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or 5105 for disengaged optionals and rvalue optionals. 5106 * testsuite/20_util/optional/observers/4.cc: Likewise. 5107 51082019-04-12 Thomas Rodgers <trodgers@redhat.com> 5109 5110 * include/pstl/algorithm_impl.h: Uglify identfiers. 5111 * include/pstl/numeric_impl.h: Uglify identfiers. 5112 * include/pstl/parallel_backend_tbb.h: Uglify identfiers. 5113 51142019-04-11 Thomas Rodgers <trodgers@redhat.com> 5115 5116 * include/bits/c++config: 5117 Add definition for __PSTL_ASSERT. 5118 Add definition for __PSTL_ASSERT_MSG. 5119 * include/pstl/algorithm_impl.h: Replace use of assert(). 5120 * include/pstl/numeric_impl.h: Replace use of assert(). 5121 * include/pstl/parallel_backend_tbb.h: 5122 Replace use of assert(). 5123 Replace use of __TBB_ASSERT(). 5124 * include/pstl/parallel_backend_utils.h: Replace use of assert(). 5125 51262019-04-11 Jonathan Wakely <jwakely@redhat.com> 5127 5128 PR libstdc++/90046 5129 * src/c++17/memory_resource.cc 5130 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if 5131 needed to allow placing a _Chunk at the end of the buffer. 5132 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert. 5133 51342019-04-10 Jonathan Wakely <jwakely@redhat.com> 5135 5136 * doc/xml/faq.xml: Add information about emergency EH pool. 5137 * doc/xml/manual/debug.xml: Update list of memory debugging tools. 5138 Move outdated information on mt_allocator to a separate section. 5139 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW 5140 doesn't affect the default allocator. 5141 5142 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix 5143 typo. 5144 5145 PR libstdc++/89851 5146 * testsuite/20_util/variant/89851.cc: New test. 5147 51482019-04-09 Jonathan Wakely <jwakely@redhat.com> 5149 5150 * include/std/variant: Adjust whitespace. Add comments. 5151 (_Multi_array): Leave primary template undefined. 5152 (_Multi_array<_Tp>): Define partial specialization for base case of 5153 recursion. 5154 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type 5155 which is always a reference. 5156 (__gen_vtable::_S_apply()): Remove function, inline body into 5157 default member initializer. 5158 * testsuite/20_util/variant/visit.cc: Test with noncopyable types. 5159 5160 * include/std/variant (__variant_idx_cookie): Add member type. 5161 (__visitor_result_type): Remove. 5162 (__do_visit): Use invoke_result instead of __visitor_result_type. 5163 * testsuite/20_util/variant/visit.cc: New test. 5164 5165 PR libstdc++/90008 5166 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove 5167 unused capture. 5168 * testsuite/20_util/variant/90008.cc: New test. 5169 51702019-04-09 Thomas Rodgers <trodgers@redhat.com> 5171 5172 * include/pstl/algorithm_impl.h: Add namespace qualification. 5173 * include/pstl/execution_defs.h: Add namespace qualification. 5174 * include/pstl/execution_impl.h: Add namespace qualification. 5175 * include/pstl/numeric_impl.h: Add namespace qualification. 5176 * include/pstl/parallel_backend_tbb.h: Add namespace qualification. 5177 * include/pstl/unseq_backend_simd.h: Add namespace qualification. 5178 * include/pstl/parallel_backend_utils.h: Include <cassert>. 5179 51802019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com> 5181 5182 Fix visit<R> for variant. 5183 * include/std/variant (__do_visit): Add a template parameter 5184 for enforcing same return types for visit. 5185 (__gen_vtable_impl): Likewise. 5186 (_S_apply_single_alt): Adjust. 5187 (__visit_invoke_impl): New. Handle casting to void. 5188 (__do_visit_invoke): New. Enforces same return types. 5189 (__do_visit_invoke_r): New. Converts return types. 5190 (__visit_invoke): Adjust. 5191 (__gen_vtable): Add a template parameter for enforcing 5192 same return types for visit. 5193 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with 5194 different return types. 5195 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that 5196 visitors with different return types don't accidentally 5197 compile with regular visitation. 5198 51992019-04-08 Christophe Lyon <christophe.lyon@linaro.org> 5200 5201 * testsuite/27_io/filesystem/iterators/caching.cc: Add 5202 dg-require-filesystem-ts. 5203 52042019-04-05 Jonathan Wakely <jwakely@redhat.com> 5205 5206 * doc/xml/manual/status_cxx2020.xml: Update status. 5207 * include/std/variant (visit<R>): Define for C++2a (P0655R1). 5208 * testsuite/20_util/variant/visit_r.cc: New test. 5209 5210 * include/bits/fs_dir.h (directory_iterator::operator*) 5211 (directory_iterator::operator->): Add noexcept. 5212 (operator==, operator!=): Replace namespace-scope equality operators 5213 for directory iterators with hidden friends. 5214 5215 PR libstdc++/89986 5216 * config/abi/pre/gnu.ver: Add missing exports. 5217 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test 5218 increment member. 5219 5220 * config/abi/pre/gnu.ver: Export new symbols. 5221 * include/bits/fs_dir.h (recursive_directory_iterator::options()) 5222 (recursive_directory_iterator::recursion_pending()) 5223 (recursive_directory_iterator::disable_recursion_pending()): Remove 5224 inline definitions. Make noexcept. 5225 (recursive_directory_iterator::depth()) 5226 (recursive_directory_iterator::operator*()) 5227 (recursive_directory_iterator::operator->()): Make noexcept. 5228 (recursive_directory_iterator::_M_options) 5229 (recursive_directory_iterator::_M_pending): Remove data members. 5230 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members. 5231 (recursive_directory_iterator::recursive_directory_iterator): Remove 5232 ctor-initializer. Use new constructor for _Dir_stack. 5233 (recursive_directory_iterator::options()) 5234 (recursive_directory_iterator::recursion_pending()) 5235 (recursive_directory_iterator::disable_recursion_pending()): Add 5236 non-inline definitions. 5237 (recursive_directory_iterator::depth()): Make noexcept. 5238 (recursive_directory_iterator::increment(error_code&)) 5239 (recursive_directory_iterator::pop(error_code&)): Adjust to new 5240 location of options and recursion_pending members. 5241 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test. 5242 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add 5243 user-declared move constructor and assignment operator, to make the 5244 type move-only. 5245 5246 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle 5247 d_type == DT_UNKNOWN immediately. 5248 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown 5249 handling here. 5250 * testsuite/27_io/filesystem/iterators/caching.cc: New test. 5251 5252 * include/bits/fs_path.h (path::operator=(path&&)): Check for self 5253 assignment. 5254 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise. 5255 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self 5256 assignment. 5257 5258 PR libstdc++/87431 (again) 5259 * include/bits/basic_string.h (__variant::_Never_valueless_alt): 5260 Define partial specialization for basic_string. 5261 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for 5262 shared_ptr and weak_ptr. 5263 * include/bits/std_function.h (_Never_valueless_alt): Likewise for 5264 function. 5265 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for 5266 vector. 5267 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for 5268 unique_ptr. 5269 * include/debug/vector (_Never_valueless_alt): Likewise for debug 5270 vector. 5271 * include/std/any (_Never_valueless_alt): Define explicit 5272 specialization for any. 5273 * include/std/variant (_Never_valueless_alt): Define primary template. 5274 (__never_valueless): Use _Never_valueless_alt instead of 5275 is_trivially_copyable. 5276 (variant::emplace<N>(Args&&...)): Add special case for non-throwing 5277 initializations to avoid try-catch overhead. Add special case for 5278 scalars produced by potentially-throwing conversions. Use 5279 _Never_valueless_alt instead of is_trivially_copyable for the 5280 remaining strong exception-safety cases. 5281 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise. 5282 * testsuite/20_util/variant/87431.cc: Run both test functions. 5283 * testsuite/20_util/variant/exception_safety.cc: New test. 5284 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string, 5285 so the variant becomes valueless. 5286 52872019-04-03 Jonathan Wakely <jwakely@redhat.com> 5288 5289 PR libstdc++/85184 5290 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant): 5291 Remove assertions. 5292 (variant::emplace<_Tp>): Return result of emplace<N> directly. 5293 5294 * include/std/string (__hash_string_base): New class template defining 5295 operator() for hashing strings. 5296 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>) 5297 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17. 5298 * testsuite/21_strings/basic_string/hash/hash.cc: New test. 5299 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test. 5300 53012019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com> 5302 5303 Use single-visitation in variant assignment and swap and relops. 5304 Also use indices instead of types when checking whether 5305 variants hold the same thing. 5306 * include/std/variant (__do_visit): Add a template parameter 5307 for index visitation, invoke with indices if index visitation 5308 is used. 5309 (__variant_idx_cookie): New. 5310 (__visit_with_index): Likewise. 5311 (_Copy_assign_base::operator=): Do single-visitation with 5312 an index visitor. 5313 (_Move_assign_base::operator=): Likewise. 5314 (_Extra_visit_slot_needed): Adjust. 5315 (__visit_invoke): Call with indices if it's an index visitor. 5316 (relops): Do single-visitation with an index visitor. 5317 (swap): Likewise. 5318 (__visitor_result_type): New. 5319 53202019-03-30 Eric Botcazou <ebotcazou@adacore.com> 5321 5322 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported. 5323 53242019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com> 5325 5326 Don't revisit a variant we are already visiting. 5327 * include/std/variant (__variant_construct_single): New. 5328 (__variant_construct): Use it. 5329 (_M_destructive_move): Likewise. 5330 (_M_destructive_copy): Likewise. 5331 (_Copy_assign_base::operator=): Adjust. 5332 (_Move_assign_base::operator=): Likewise. 5333 (swap): Likewise. 5334 53352019-03-26 Jonathan Wakely <jwakely@redhat.com> 5336 5337 PR libstdc++/85965 5338 * include/bits/hashtable.h (_Hashtable): Move static assertions to 5339 destructor so they are not evaluated until the _Key type is complete. 5340 * include/bits/stl_tree.h (_Rb_tree): Likewise. 5341 * testsuite/23_containers/set/85965.cc: New test. 5342 * testsuite/23_containers/unordered_set/85965.cc: New test. 5343 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors 5344 with regexp matching the corresponding _Rb_tree specialization. 5345 * testsuite/23_containers/multimap/48101_neg.cc: Likewise. 5346 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error. 5347 * testsuite/23_containers/set/48101_neg.cc: Likewise. 5348 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise. 5349 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise. 5350 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise. 5351 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise. 5352 53532019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com> 5354 5355 PR libstdc++/89825 5356 Fix based on a suggestion by Antony Polukhin. 5357 * include/std/variant (__never_valueless): New. 5358 (_M_valid): Use it. 5359 (_Extra_visit_slot_needed): New. 5360 (_Multi_array): Use it. 5361 (_S_apply_all_alts): Likewise. 5362 53632019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com> 5364 5365 PR libstdc++/89824 5366 Fix based on a suggestion by Antony Polukhin. 5367 * include/std/variant (__gen_vtable): Don't reserve an 5368 additional table slot, _Multi_array already does that. 5369 53702019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com> 5371 5372 PR libstdc++/89816 5373 Fix based on a suggestion by Antony Polukhin. 5374 * include/std/variant (__variant_construct): Capture a pointer 5375 to the storage and visit just one variant. 5376 53772019-03-22 Jonathan Wakely <jwakely@redhat.com> 5378 5379 * doc/xml/manual/backwards_compatibility.xml: Remove link to 5380 Doxygen-generated pages with unstable URL. 5381 * doc/xml/manual/concurrency_extensions.xml: Likewise. 5382 * doc/xml/manual/extensions.xml: Likewise. 5383 * doc/xml/manual/parallel_mode.xml: Likewise. 5384 * doc/xml/manual/support.xml: Likewise. 5385 5386 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to 5387 avoid -Wconversion warnings. 5388 53892019-03-21 Thomas Rodgers <trodgers@redhat.com> 5390 5391 * include/Makefile.am (std_header): Add ${std_srcdir}/execution. 5392 (pstl_srcdir, pstl_builddir, pstl_headers): New variables. 5393 (allstamped): Add stamp-pstl. 5394 (install-headers): Add ptsl_builddir. 5395 * include/Makefile.in: Regenerate. 5396 * include/bits/c++config: Add pstl configuration. 5397 * include/pstl/LICENSE.txt: New file. 5398 * include/pstl/algorithm_fwd.h: New file. 5399 * include/pstl/algorithm_impl.h: New file. 5400 * include/pstl/execution_defs.h: New file. 5401 * include/pstl/execution_impl.h: New file. 5402 * include/pstl/glue_algorithm_defs.h: New file. 5403 * include/pstl/glue_algorithm_impl.h: New file. 5404 * include/pstl/glue_execution_defs.h: New file. 5405 * include/pstl/glue_memory_defs.h: New file. 5406 * include/pstl/glue_memory_impl.h: New file. 5407 * include/pstl/glue_numeric_defs.h: New file. 5408 * include/pstl/glue_numeric_impl.h: New file. 5409 * include/pstl/memory_impl.h: New file. 5410 * include/pstl/numeric_fwd.h: New file. 5411 * include/pstl/numeric_impl.h: New file. 5412 * include/pstl/parallel_backend.h: New file. 5413 * include/pstl/parallel_backend_tbb.h: New file. 5414 * include/pstl/parallel_backend_utils.h: New file. 5415 * include/pstl/parallel_impl.h: New file. 5416 * include/pstl/pstl_config.h: New file. 5417 * include/pstl/unseq_backend_simd.h: New file. 5418 * include/pstl/utils.h: New file. 5419 * include/std/algorithm: Include parallel algorithm implementations. 5420 * include/std/execution: New file. 5421 * include/std/memory: Include parallel algorithm implementations. 5422 * include/std/numeric: Include parallel algorithm implementations. 5423 * include/std/version: Add parallel algorithms feature test macro. 5424 * testsuite/util/pstl/pstl_test_config.h: New file. 5425 * testsuite/util/pstl/test_utils.h: New file. 5426 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file. 5427 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file. 5428 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file. 5429 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file. 5430 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file. 5431 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file. 5432 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file. 5433 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file. 5434 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file. 5435 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file. 5436 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file. 5437 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file. 5438 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file. 5439 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file. 5440 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file. 5441 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file. 5442 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file. 5443 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file. 5444 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file. 5445 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file. 5446 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file. 5447 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file. 5448 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file. 5449 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file. 5450 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file. 5451 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file. 5452 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file. 5453 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file. 5454 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file. 5455 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file. 5456 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file. 5457 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file. 5458 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file. 5459 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file. 5460 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file. 5461 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file. 5462 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file. 5463 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file. 5464 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file. 5465 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file. 5466 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file. 5467 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file. 5468 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file. 5469 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file. 5470 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file. 5471 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file. 5472 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file. 5473 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file. 5474 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file. 5475 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file. 5476 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file. 5477 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file. 5478 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file. 5479 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file. 5480 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file. 5481 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file. 5482 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file. 5483 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file. 5484 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file. 5485 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file. 5486 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file. 5487 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file. 5488 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file. 5489 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file. 5490 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file. 5491 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file. 5492 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file. 5493 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file. 5494 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file. 5495 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file. 5496 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file. 5497 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file. 5498 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file. 5499 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file. 5500 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file. 5501 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file. 5502 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file. 5503 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file. 5504 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file. 5505 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file. 5506 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file. 5507 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file. 5508 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file. 5509 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file. 5510 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file. 5511 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file. 5512 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file. 5513 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file. 5514 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file. 5515 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file. 5516 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file. 5517 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file. 5518 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file. 5519 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file. 5520 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file. 5521 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file. 5522 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file. 5523 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file. 5524 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file. 5525 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file. 5526 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file. 5527 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file. 5528 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file. 5529 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file. 5530 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file. 5531 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file. 5532 55332019-03-21 Jonathan Wakely <jwakely@redhat.com> 5534 5535 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__] 5536 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre) 5537 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1) 5538 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f) 5539 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l) 5540 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j) 5541 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf) 5542 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1) 5543 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3) 5544 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef) 5545 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref) 5546 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel) 5547 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel) 5548 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations 5549 when the special functions IS is enabled, not for C++17. 5550 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc: 5551 Replace with ... 5552 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test, 5553 without checks for special functions in C++17. 5554 * testsuite/26_numerics/headers/cmath/special_functions_global.cc: 5555 New test. 5556 5557 PR libstdc++/88066 5558 * include/backward/hash_map: Use <> for includes not "". 5559 * include/backward/hash_set: Likewise. 5560 * include/backward/strstream: Likewise. 5561 * include/tr1/bessel_function.tcc: Likewise. 5562 * include/tr1/exp_integral.tcc: Likewise. 5563 * include/tr1/legendre_function.tcc: Likewise. 5564 * include/tr1/modified_bessel_func.tcc: Likewise. 5565 * include/tr1/riemann_zeta.tcc: Likewise. 5566 55672019-03-19 Jonathan Wakely <jwakely@redhat.com> 5568 5569 * doc/xml/manual/allocator.xml: Link to table documenting evolution 5570 of extension allocators. 5571 * doc/xml/manual/evolution.xml: Use angle brackets for header names. 5572 Document new headers in 7.2, 8.1 and 9.1 releases. 5573 * doc/xml/manual/using.xml: Adjust link target for new_allocator. 5574 * doc/html/*: Regenerate. 5575 55762019-03-12 John David Anglin <dave.anglin@bell.net> 5577 5578 PR libstdc++/89461 5579 * testsuite/lib/libstdc++.exp: Locate libatomic. 5580 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New. 5581 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add 5582 libatomic options. 5583 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. 5584 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise. 5585 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise. 5586 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise. 5587 55882019-03-11 Jonathan Wakely <jwakely@redhat.com> 5589 5590 PR libstdc++/89460 5591 * configure.ac: Check for sockatmark. 5592 * crossconfig.m4: Check for sockatmark. 5593 * config.h.in: Regenerate. 5594 * configure: Regenerate. 5595 * include/experimental/internet (address_v4::_S_hton): Rename 5596 overloaded functions to _S_hton_16 and _S_ntoh_16. 5597 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32. 5598 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh. 5599 * include/experimental/socket (basic_socket::at_mark): Check 5600 _GLIBCXX_HAVE_SOCKATMARK. 5601 5602 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use 5603 const variables instead of macros. 5604 5605 PR libstdc++/89629 5606 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes): 5607 Use correct type for len_aligned. 5608 * testsuite/20_util/hash/89629.cc: New test. 5609 56102019-03-11 Jakub Jelinek <jakub@redhat.com> 5611 5612 PR libstdc++/89641 5613 * include/std/atomic (atomic<T>::store, atomic<T>::load, 5614 atomic<T>::exchange, atomic<T>::compare_exchange_weak, 5615 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int. 5616 * include/bits/atomic_base.h (__atomic_base<T>::operator++, 5617 __atomic_base<T>::operator--, __atomic_base<T>::operator+=, 5618 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=, 5619 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=, 5620 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--, 5621 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast 5622 memory_order_seq_cst to int. 5623 56242019-03-08 Jonathan Wakely <jwakely@redhat.com> 5625 5626 * doc/xml/manual/using.xml: Use link element instead of xref. 5627 * doc/html/*: Regenerate. 5628 5629 * include/bits/fs_path.h (path::format): Add fixed underlying type. 5630 56312019-03-08 François Dumont <fdumont@gcc.gnu.org> 5632 5633 PR libstdc++/89477 5634 * include/debug/map.h (map): Use _RequireNotAllocator to constrain 5635 parameters in deduction guides. 5636 * include/debug/multimap.h (multimap): Likewise. 5637 * include/debug/set.h (multimap): Likewise. 5638 * include/debug/multiset.h (multimap): Likewise. 5639 * include/debug/unordered_map (unordered_map): Likewise. 5640 (unordered_multimap): Likewise. 5641 * include/debug/unordered_set (unordered_set): Likewise. 5642 (unordered_multiset): Likewise. 5643 5644 PR libstdc++/89608 5645 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed): 5646 Invalidate all iterators in case of rehash. 5647 (unordered_multimap<>::_M_check_rehashed): Likewise. 5648 * include/debug/unordered_set 5649 (unordered_set<>::_M_check_rehashed): Likewise. 5650 (unordered_multiset<>::_M_check_rehashed): Likewise. 5651 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New. 5652 56532019-03-07 Andreas Schwab <schwab@suse.de> 5654 5655 * config/abi/post/riscv64-linux-gnu: New directory. 5656 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file. 5657 56582019-03-07 Jonathan Wakely <jwakely@redhat.com> 5659 5660 * testsuite/20_util/function_objects/bind_front/1.cc: Change from 5661 compile test to run. Fix typo. 5662 5663 * doc/xml/manual/status_cxx2020.xml: Update C++20 status. 5664 * doc/html/*: Regenerate. 5665 5666 P0356R5 Simplified partial function application 5667 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define 5668 helpers for bind_front. 5669 (bind_front, __cpp_lib_bind_front): Define. 5670 * testsuite/20_util/function_objects/bind_front/1.cc: New test. 5671 56722019-03-06 Jonathan Wakely <jwakely@redhat.com> 5673 5674 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define. 5675 * include/std/version (__cpp_lib_bounded_array_traits): Likewise. 5676 * testsuite/20_util/is_bounded_array/value.cc: Check for macro. 5677 * testsuite/20_util/is_unbounded_array/value.cc: Likewise. 5678 56792019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net> 5680 5681 PR libstdc++/86655 - std::assoc_legendre should not constrain 5682 the value of m (or x). 5683 * include/tr1/legendre_function.tcc (__assoc_legendre_p, 5684 __sph_legendre): If degree > order Don't throw, return 0. 5685 (__legendre_p, __assoc_legendre_p): Don't constrain x either. 5686 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test. 5687 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test. 5688 * testsuite/tr1/5_numerical_facilities/special_functions/ 5689 02_assoc_legendre/pr86655.cc: New test. 5690 * testsuite/tr1/5_numerical_facilities/special_functions/ 5691 22_sph_legendre/pr86655.cc: New test. 5692 56932019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com> 5694 5695 Rewrite variant. 5696 Also PR libstdc++/85517 5697 * include/std/variant (__do_visit): New. 5698 (__variant_cast): Likewise. 5699 (__variant_cookie): Likewise. 5700 (__erased_*): Remove. 5701 (_Variant_storage::_S_vtable): Likewise. 5702 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit. 5703 (_Variant_storage::__M_reset): Adjust. 5704 (__variant_construct): New. 5705 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use 5706 __variant_construct. 5707 (_Move_ctor_base(_Move_ctor_base&&)): Likewise. 5708 (_Move_ctor_base::__M_destructive_copy): New. 5709 (_Move_ctor_base::__M_destructive_move): Adjust to use 5710 __variant_construct. 5711 (_Copy_assign_base::operator=): Adjust to use __do_visit. 5712 (_Copy_assign_alias): Adjust to check both copy assignment 5713 and copy construction for triviality. 5714 (_Move_assign_base::operator=): Adjust to use __do_visit. 5715 (_Multi_array): Add support for visitors that accept and return 5716 a __variant_cookie. 5717 (__gen_vtable_impl::_S_apply_all_alts): Likewise. 5718 (__gen_vtable_impl::_S_apply_single_alt): Likewise. 5719 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate 5720 a __variant_cookie temporary for a variant that is valueless and.. 5721 (__gen_vtable_impl::__visit_invoke): ..adjust here. 5722 (__gen_vtable::_Array_type): Conditionally make space for 5723 the __variant_cookie visitor case. 5724 (__variant_construct_by_index): New. 5725 (get_if): Adjust to use std::addressof. 5726 (relops): Adjust to use __do_visit. 5727 (variant): Add __variant_cast and __variant_construct_by_index 5728 as friends. 5729 (variant::emplace): Use _M_reset() and __variant_construct_by_index 5730 instead of self-destruction. 5731 (variant::swap): Adjust to use __do_visit. 5732 (visit): Reimplement in terms of __do_visit. 5733 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit. 5734 * testsuite/20_util/variant/compile.cc: Adjust. 5735 * testsuite/20_util/variant/run.cc: Likewise. 5736 57372019-03-06 Jonathan Wakely <jwakely@redhat.com> 5738 5739 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to 5740 constant. 5741 * testsuite/experimental/feat-char8_t.cc: Likewise. 5742 5743 * include/std/type_traits [C++20] (is_bounded_array) 5744 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v): 5745 Define. 5746 * testsuite/20_util/is_bounded_array/requirements/ 5747 explicit_instantiation.cc: New test. 5748 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New 5749 test. 5750 * testsuite/20_util/is_bounded_array/value.cc: New test. 5751 * testsuite/20_util/is_unbounded_array/requirements/ 5752 explicit_instantiation.cc: New test. 5753 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New 5754 * test. 5755 * testsuite/20_util/is_unbounded_array/value.cc: New test. 5756 5757 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to): 5758 Add constexpr. 5759 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test. 5760 57612019-03-05 Jonathan Wakely <jwakely@redhat.com> 5762 5763 * include/c_compatibility/math.h [C++20] (lerp): Add using 5764 declaration. 5765 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define. 5766 (__lerp): Define function template to implement lerp. 5767 (lerp(float, float, float), lerp(double, double, double)) 5768 (lerp(long double, long double, long double)): Define for C++20. 5769 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define. 5770 (midpoint(T, T), midpoint(T*, T*)): Define. 5771 * include/std::version [C++20] (__cpp_lib_interpolate): Define. 5772 * testsuite/26_numerics/lerp.cc: New test. 5773 * testsuite/26_numerics/midpoint/floating.cc: New test. 5774 * testsuite/26_numerics/midpoint/integral.cc: New test. 5775 * testsuite/26_numerics/midpoint/pointer.cc: New test. 5776 57772019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net> 5778 5779 PR libstdc++/88996 Implement P0439R0 5780 Make std::memory_order a scoped enumeration. 5781 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum, 5782 add variables for the old enumerators. Adjust calls. 5783 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test. 5784 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test. 5785 57862019-03-04 Jonathan Wakely <jwakely@redhat.com> 5787 5788 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do 5789 directive. 5790 5791 * include/std/memory_resource (polymorphic_allocator): Add default 5792 template argument for C++20. 5793 (polymorphic_allocator::allocate_bytes) 5794 (polymorphic_allocator::deallocate_bytes) 5795 (polymorphic_allocator::allocate_object) 5796 (polymorphic_allocator::deallocate_object) 5797 (polymorphic_allocator::new_object) 5798 (polymorphic_allocator::delete_object): New member functions for 5799 C++20. 5800 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New 5801 test. 5802 58032019-03-03 Jonathan Wakely <jwakely@redhat.com> 5804 5805 PR libstdc++/89562 5806 * src/filesystem/ops-common.h (do_copy_file): Open files in binary 5807 mode for mingw. 5808 58092019-03-01 Jonathan Wakely <jwakely@redhat.com> 5810 5811 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource) 5812 [!__cpp_sized_deallocation]: Do not pass size to operator delete. 5813 5814 * include/std/memory (uses_allocator_construction_args): New set of 5815 overloaded functions. 5816 (make_obj_using_allocator, uninitialized_construct_using_allocator): 5817 New functions. 5818 * include/std/memory_resource (polymorphic_allocator::construct) 5819 [__cplusplus > 201703l]: Replace all overloads with a single function 5820 using uses_allocator_construction_args. 5821 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New 5822 test. 5823 * testsuite/20_util/uses_allocator/make_obj.cc: New test. 5824 58252019-02-27 Jonathan Wakely <jwakely@redhat.com> 5826 5827 PR libstdc++/89466 5828 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local 5829 stylesheet directories before check for xsltproc. Try to use 5830 xmlcatalog to find local stylesheet directory before trying hardcoded 5831 paths. Add path used by suse to hardcoded paths. Adjust xsltproc 5832 check to look for the same stylesheet as doc/Makefile.am uses. Don't 5833 use xsltproc if xmlcatalog fails to find a local stylesheet. 5834 * configure.ac: Check for xmlcatalog. 5835 * Makefile.in: Regenerate. 5836 * configure: Likewise. 5837 * doc/Makefile.in: Likewise. 5838 * include/Makefile.in: Likewise. 5839 * libsupc++/Makefile.in: Likewise. 5840 * po/Makefile.in: Likewise. 5841 * python/Makefile.in: Likewise. 5842 * src/Makefile.in: Likewise. 5843 * src/c++11/Makefile.in: Likewise. 5844 * src/c++17/Makefile.in: Likewise. 5845 * src/c++98/Makefile.in: Likewise. 5846 * src/filesystem/Makefile.in: Likewise. 5847 * testsuite/Makefile.in: Likewise. 5848 58492019-02-26 Jonathan Wakely <jwakely@redhat.com> 5850 5851 PR libstdc++/89477 5852 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for 5853 container deduction guides. 5854 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise. 5855 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain 5856 parameters in deduction guides. 5857 * include/bits/stl_multimap.h (multimap): Likewise. 5858 * include/bits/stl_multiset.h (multiset): Likewise. 5859 * include/bits/stl_queue.h (queue, priority_queue): Likewise. 5860 * include/bits/stl_set.h (set): Likewise. 5861 * include/bits/stl_stack.h (stack): Likewise. 5862 * include/bits/unordered_map.h (unordered_map, unordered_multimap): 5863 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to 5864 constrain parameters in deduction guides. 5865 * include/bits/unordered_set.h (unordered_set, unordered_multiset): 5866 Likewise. 5867 * testsuite/23_containers/map/cons/deduction.cc: Test additional 5868 deduction cases. 5869 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise. 5870 * testsuite/23_containers/set/cons/deduction.cc: Likewise. 5871 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise. 5872 * testsuite/23_containers/unordered_multimap/cons/deduction.cc: 5873 Likewise. 5874 * testsuite/23_containers/unordered_multiset/cons/deduction.cc: 5875 Likewise. 5876 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise. 5877 5878 PR libstdc++/89416 5879 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change 5880 to class template and partial specialization using void_t. 5881 (__is_copy_insertable, __is_move_insertable): Adjust base class. 5882 58832019-02-24 Jonathan Wakely <jwakely@redhat.com> 5884 5885 PR libstdc++/89416 5886 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make 5887 copy and move members public. 5888 58892019-02-23 Jonathan Wakely <jwakely@redhat.com> 5890 5891 * include/std/type_traits (__underlying_type_impl): New helper to 5892 make underlying_type SFINAE-friendly. 5893 (underlying_type): Derive from __underlying_type_impl. 5894 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New 5895 test. 5896 5897 PR libstdc++/89446 5898 * include/bits/char_traits.h (__constant_char_array): Check index is 5899 in range before dereferencing. 5900 (char_traits<char>::compare, char_traits<char>::find) 5901 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return 5902 immediately if n is zero. 5903 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise. 5904 Remove workarounds for PR 67026. 5905 * testsuite/21_strings/basic_string_view/operators/char/89446.cc: 5906 New test. 5907 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc: 5908 New test. 5909 59102019-02-22 Eric Botcazou <ebotcazou@adacore.com> 5911 5912 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust. 5913 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise. 5914 59152019-02-22 Jakub Jelinek <jakub@redhat.com> 5916 5917 PR libstdc++/89402 5918 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return 5919 type to std::size_t and argument to type to long double. 5920 59212019-02-22 Eric Botcazou <ebotcazou@adacore.com> 5922 5923 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux. 5924 * config/abi/post/sparc64-linux-gnu: New directory. 5925 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file. 5926 * config/abi/post/sparc64-linux-gnu/32: New directory. 5927 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file. 5928 59292019-02-21 Jonathan Wakely <jwakely@redhat.com> 5930 5931 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test. 5932 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New 5933 test. 5934 59352019-02-22 Tom Honermann <tom@honermann.net> 5936 5937 * python/libstdcxx/v6/printers.py (register_type_printers): Add type 5938 printers for u8string and u8string_view. 5939 59402019-02-22 Tom Honermann <tom@honermann.net> 5941 5942 * testsuite/18_support/byte/ops.cc: Validate 5943 std::to_integer<char8_t>, std::to_integer<char16_t>, and 5944 std::to_integer<char32_t>. 5945 * testsuite/18_support/numeric_limits/dr559.cc: Validate 5946 std::numeric_limits<char8_t>. 5947 * testsuite/18_support/numeric_limits/lowest.cc: Validate 5948 std::numeric_limits<char8_t>::lowest(). 5949 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate 5950 std::numeric_limits<char8_t>::max_digits10. 5951 * testsuite/18_support/type_info/fundamental.cc: Validate 5952 typeinfo for char8_t. 5953 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating 5954 std::from_chars with char8_t. 5955 * testsuite/20_util/hash/requirements/explicit_instantiation.cc: 5956 Validate explicit instantiation of std::hash<char8_t>. 5957 * testsuite/20_util/is_integral/value.cc: Validate 5958 std::is_integral<char8_t>. 5959 * testsuite/20_util/make_signed/requirements/typedefs-4.cc: 5960 Validate std::make_signed<char8_t>. 5961 * testsuite/21_strings/basic_string/cons/char/deduction.cc: 5962 Validate u8string construction from char8_t sources. 5963 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate 5964 std::pmr::u8string. 5965 * testsuite/21_strings/basic_string_view/operations/compare/ 5966 char/70483.cc: Validate substr operations on u8string_view. 5967 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that 5968 the u8string_view typedef is defined. 5969 * testsuite/21_strings/char_traits/requirements/ 5970 constexpr_functions.cc: Validate char_traits<char8_t> constexpr 5971 member functions. 5972 * testsuite/21_strings/char_traits/requirements/ 5973 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17 5974 constexpr member functions. 5975 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate 5976 that the u8string typedef is defined. 5977 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence 5978 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and 5979 std::codecvt<char32_t, char8_t, std::mbstate_t> facets. 5980 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line 5981 numbers. 5982 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise. 5983 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: 5984 Likewise. 5985 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise. 5986 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc: 5987 Validate std::atomic<char8_t>::is_always_lock_free 5988 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc: 5989 Update line numbers. 5990 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc: 5991 Likewise. 5992 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc: 5993 Likewise. 5994 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc: 5995 Validate std::experimental::pmr::u8string. 5996 * testsuite/experimental/string_view/typedefs.cc: Validate that the 5997 u8string_view typedef is defined. 5998 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and 5999 char32_t to the typelists. 6000 60012019-02-22 Tom Honermann <tom@honermann.net> 6002 6003 * include/ext/typelist.h: Constrain a partial specialization of 6004 typelist::detail::append_ to only match chain<T1,T2>. 6005 60062019-02-21 Jonathan Wakely <jwakely@redhat.com> 6007 6008 PR libstdc++/89416 6009 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace 6010 class template with class. Replace move and copy member types with 6011 member alias templates, so they are only instantiated when needed. 6012 (__is_copy_insertable, __is_move_insertable): Adjust base class. 6013 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable 6014 test for C++11/14/17 as well. 6015 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New 6016 test. 6017 60182019-02-20 Jakub Jelinek <jakub@redhat.com> 6019 6020 PR libstdc++/89402 6021 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add 6022 _GLIBCXX_PURE to the alias declaration. 6023 60242019-02-19 Jonathan Wakely <jwakely@redhat.com> 6025 6026 * testsuite/21_strings/basic_string/literals/types.cc 6027 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal. 6028 * testsuite/21_strings/basic_string/literals/values.cc 6029 [_GLIBCXX_USE_CHAR8_T]: Likewise. 6030 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals 6031 potentially having different type. 6032 * testsuite/22_locale/codecvt/char32_t.cc: Likewise. 6033 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal 6034 to char. 6035 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise. 6036 * testsuite/22_locale/codecvt/utf8.cc: Likewise. 6037 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from 6038 string literals only using basic character set. 6039 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other 6040 u8 literals to char. 6041 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]: 6042 Test ATOMIC_CHAR8_T_LOCK_FREE. 6043 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test. 6044 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc 6045 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t. 6046 * testsuite/experimental/string_view/literals/types.cc 6047 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8 6048 literal. 6049 * testsuite/experimental/string_view/literals/values.cc 6050 [_GLIBCXX_USE_CHAR8_T]: Likewise. 6051 60522019-02-19 Tom Honermann <tom@honermann.net> 6053 6054 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned 6055 from char16_32_t.cc; validates numeric_limits<char8_t>. 6056 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New 6057 test cloned from types.cc; validates operator""s for char8_t 6058 returns u8string. 6059 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New 6060 test cloned from values.cc; validates construction and comparison 6061 of u8string values. 6062 * testsuite/21_strings/basic_string/requirements/ 6063 /explicit_instantiation/char8_t/1.cc: New test cloned from 6064 char16_t/1.cc; validates explicit instantiation of 6065 basic_string<char8_t>. 6066 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc: 6067 New test cloned from types.cc; validates operator""sv for char8_t 6068 returns u8string_view. 6069 * testsuite/21_strings/basic_string_view/literals/ 6070 values-char8_t.cc: New test cloned from values.cc; validates 6071 construction and comparison of u8string_view values. 6072 * testsuite/21_strings/basic_string_view/requirements/ 6073 explicit_instantiation/char8_t/1.cc: New test cloned from 6074 char16_t/1.cc; validates explicit instantiation of 6075 basic_string_view<char8_t>. 6076 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc: 6077 New test cloned from char16_t/65049.cc; validates that 6078 char_traits<char8_t> is not vulnerable to the concerns in PR65049. 6079 * testsuite/21_strings/char_traits/requirements/char8_t/ 6080 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates 6081 that char_traits<char8_t> member typedefs are present and correct. 6082 * testsuite/21_strings/char_traits/requirements/ 6083 explicit_instantiation/char8_t/1.cc: New test cloned from 6084 char16_t/1.cc; validates explicit instantiation of 6085 char_traits<char8_t>. 6086 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned 6087 from char16_t.cc: validates 6088 codecvt<char16_t, char8_t, mbstate_t>. 6089 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned 6090 from char32_t.cc: validates 6091 codecvt<char32_t, char8_t, mbstate_t>. 6092 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from 6093 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and 6094 codecvt<char32_t, char8_t, std::mbstate_t>. 6095 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New 6096 test cloned from string.cc; validates filesystem::path construction 6097 from char8_t input. 6098 * testsuite/experimental/feat-char8_t.cc: New test; validates that 6099 the __cpp_lib_char8_t feature test macro is defined with the 6100 correct value. 6101 * testsuite/experimental/filesystem/path/native/string-char8_t.cc: 6102 New test cloned from string.cc; validates filesystem::path 6103 construction from char8_t input. 6104 * testsuite/experimental/string_view/literals/types-char8_t.cc: New 6105 test cloned from types.cc; validates operator""sv for char8_t 6106 returns u8string_view. 6107 * testsuite/experimental/string_view/literals/values-char8_t.cc: 6108 New test cloned from values.cc; validates construction and 6109 comparison of u8string_view values. 6110 * testsuite/experimental/string_view/requirements/ 6111 explicit_instantiation/char8_t/1.cc: New test cloned from 6112 char16_t/1.cc; validates explicit instantiation of 6113 basic_string_view<char8_t>. 6114 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that 6115 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not 6116 enabled. 6117 61182019-02-19 Tom Honermann <tom@honermann.net> 6119 6120 P0482R5 char8_t: Standard library support 6121 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add 6122 typeinfo symbols for char8_t. 6123 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12. 6124 (GLIBCXX_3.4.26): Add symbols for specializations of 6125 numeric_limits and codecvt that involve char8_t. 6126 (CXXABI_1.3.12): Add typeinfo symbols for char8_t. 6127 * include/bits/atomic_base.h: Add atomic_char8_t. 6128 * include/bits/basic_string.h: Add std::hash<u8string> and 6129 operator""s(const char8_t*, size_t). 6130 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and 6131 __cpp_lib_char8_t. 6132 * include/bits/char_traits.h: Add char_traits<char8_t>. 6133 * include/bits/codecvt.h: Add 6134 codecvt<char16_t, char8_t, mbstate_t>, 6135 codecvt<char32_t, char8_t, mbstate_t>, 6136 codecvt_byname<char16_t, char8_t, mbstate_t>, and 6137 codecvt_byname<char32_t, char8_t, mbstate_t>. 6138 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to 6139 recognize char8_t as an integral type. 6140 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize 6141 char8_t. 6142 (path::u8string): Return std::u8string when char8_t support is 6143 enabled. 6144 (path::generic_u8string): Likewise. 6145 (path::_S_convert): Handle conversion from char8_t input. 6146 (path::_S_str_convert): Likewise. 6147 * include/bits/functional_hash.h: Add hash<char8_t>. 6148 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for 6149 char8_t. 6150 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump 6151 for new char8_t specializations. 6152 * include/bits/localefwd.h: Add missing declarations of 6153 codecvt<char16_t, char, mbstate_t> and 6154 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations 6155 codecvt<char16_t, char8_t, mbstate_t> and 6156 codecvt<char32_t, char8_t, mbstate_t>. 6157 * include/bits/postypes.h: Add u8streampos 6158 * include/bits/stringfwd.h: Add declarations of 6159 char_traits<char8_t> and u8string. 6160 * include/c_global/cstddef: Add __byte_operand<char8_t>. 6161 * include/experimental/bits/fs_path.h (path::__is_encoded_char): 6162 Recognize char8_t. 6163 (path::u8string): Return std::u8string when char8_t support is 6164 enabled. 6165 (path::generic_u8string): Likewise. 6166 (path::_S_convert): Handle conversion from char8_t input. 6167 (path::_S_str_convert): Likewise. 6168 * include/experimental/string: Add u8string. 6169 * include/experimental/string_view: Add u8string_view, 6170 hash<experimental::u8string_view>, and 6171 operator""sv(const char8_t*, size_t). 6172 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t. 6173 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t 6174 as a character type. 6175 * include/std/limits: Add numeric_limits<char8_t>. 6176 * include/std/string_view: Add u8string_view, 6177 hash<experimental::u8string_view>, and 6178 operator""sv(const char8_t*, size_t). 6179 * include/std/type_traits: Add __is_integral_helper<char8_t>, 6180 __make_unsigned<char8_t>, and __make_signed<char8_t>. 6181 * libsupc++/atomic_lockfree_defines.h: Define 6182 ATOMIC_CHAR8_T_LOCK_FREE. 6183 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling 6184 codecvt.cc and limits.cc so that char8_t specializations of 6185 numeric_limits and codecvt and emitted. 6186 * src/c++11/Makefile.in: Likewise. 6187 * src/c++11/codecvt.cc: Define members of 6188 codecvt<char16_t, char8_t, mbstate_t>, 6189 codecvt<char32_t, char8_t, mbstate_t>, 6190 codecvt_byname<char16_t, char8_t, mbstate_t>, and 6191 codecvt_byname<char32_t, char8_t, mbstate_t>. 6192 * src/c++11/limits.cc: Define members of 6193 numeric_limits<char8_t>. 6194 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling 6195 locale_init.cc and localename.cc. 6196 * src/c++98/Makefile.in: Likewise. 6197 * src/c++98/locale_init.cc: Add initialization for the 6198 codecvt<char16_t, char8_t, mbstate_t> and 6199 codecvt<char32_t, char8_t, mbstate_t> facets. 6200 * src/c++98/localename.cc: Likewise. 6201 * testsuite/util/testsuite_abi.cc: Validate ABI bump. 6202 62032019-02-18 Wilco Dijkstra <wdijkstr@arm.com> 6204 6205 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts. 6206 * 27_io/filesystem/operations/resize_file.cc: Likewise. 6207 * 27_io/filesystem/path/generation/normal2.cc: Likewise. 6208 62092019-02-14 Jonathan Wakely <jwakely@redhat.com> 6210 6211 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status. 6212 * doc/html/*: Regenerate. 6213 6214 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table. 6215 * doc/html/*: Regenerate. 6216 6217 * doc/xml/manual/intro.xml: Document LWG 2586 status. 6218 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue 6219 allocator type in is_constructible checks. 6220 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error. 6221 * testsuite/20_util/scoped_allocator/dr2586.cc: New test. 6222 * testsuite/20_util/tuple/cons/allocators.cc: Add test using 6223 problematic type from LWG 2586 discussion. 6224 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error. 6225 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise. 6226 6227 * configure.ac: Check for C11 timespec_get function. 6228 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd) 6229 (openbsd): Likewise 6230 * config.h.in: Regenerate. 6231 * configure: Regenerate. 6232 * include/c_global/ctime (timespec, timespec_get): Add to namespace 6233 std for C++17 and up. 6234 6235 * doc/xml/manual/intro.xml: Document LWG 2537 status. 6236 * include/bits/stl_queue.h 6237 (priority_queue(const Compare&, const Container&, const Alloc&)) 6238 (priority_queue(const Compare&, Container&&, const Alloc&)): Call 6239 make_heap. 6240 * testsuite/23_containers/priority_queue/dr2537.cc: New test. 6241 6242 * doc/xml/manual/intro.xml: Document LWG 2566 status. 6243 * include/bits/stl_queue.h (queue, priority_queue): Add static 6244 assertions to enforce LWG 2566 requirement on value_type. 6245 * include/bits/stl_stack.h (stack): Likewise. 6246 6247 PR middle-end/89303 6248 * testsuite/20_util/enable_shared_from_this/89303.cc: New test. 6249 6250 * doc/xml/manual/intro.xml: Document LWG 2735 status. 6251 * include/bits/std_abs.h: Add comment about LWG 2735. 6252 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test. 6253 62542019-02-13 Jonathan Wakely <jwakely@redhat.com> 6255 6256 PR libstdc++/89345 6257 * include/std/version [__cpp_impl_destroying_delete] 6258 (__cpp_lib_destroying_delete): Only define for C++2a and later. 6259 * libsupc++/new [__cpp_impl_destroying_delete] 6260 (__cpp_lib_destroying_delete): Likewise. 6261 (destroying_delete_t, destroying_delete): Likewise, but define even 6262 when __cpp_impl_destroying_delete is not defined. 6263 * testsuite/18_support/destroying_delete.cc: New test. 6264 62652019-02-11 Jonathan Wakely <jwakely@redhat.com> 6266 6267 PR libstdc++/89023 6268 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test. 6269 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test. 6270 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test. 6271 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove. 6272 62732019-02-09 Jonathan Wakely <jwakely@redhat.com> 6274 6275 PR libstdc++/71044 6276 * include/bits/fs_path.h (path::has_root_name) 6277 (path::has_root_directory, path::has_root_path) 6278 (path::has_relative_path, path::has_parent_path) 6279 (path::has_filename, path::has_stem, path::has_extension) 6280 (path::is_absolute, path::is_relative, path::_M_find_extension): Add 6281 noexcept. 6282 * src/c++17/fs_path.cc (path::has_root_name) 6283 (path::has_root_directory, path::has_root_path) 6284 (path::has_relative_path, path::has_parent_path) 6285 (path::has_filename, path::_M_find_extension): Add noexcept. 6286 62872019-02-06 Jonathan Wakely <jwakely@redhat.com> 6288 6289 PR libstdc++/89102 (partial) 6290 * include/std/type_traits (common_type<>): Define. 6291 (common_type<T>): Derive from common_type<T, T>. 6292 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc: 6293 Test zero-length template argument list. 6294 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc: 6295 Test additional single argument cases. 6296 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc: 6297 Adjust expected error. 6298 62992019-02-05 Jonathan Wakely <jwakely@redhat.com> 6300 6301 PR libstdc++/89128 6302 * include/bits/stl_queue.h (queue, priority_queue): Add deduction 6303 guides. 6304 * include/bits/stl_stack.h (stack): Likewise. 6305 * testsuite/23_containers/priority_queue/deduction.cc: New test. 6306 * testsuite/23_containers/queue/deduction.cc: New test. 6307 * testsuite/23_containers/stack/deduction.cc: New test. 6308 6309 PR libstdc++/89194 6310 * include/std/type_traits (__is_convertible_helper) 6311 (__is_convertible_helper<_From, _To, false>): Revert changes to 6312 support is_nothrow_convertible. 6313 (__is_nt_convertible_helper): New helper. 6314 (is_nothrow_convertible): Use __is_nt_convertible_helper. 6315 6316 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore 6317 use of CopyConsOnlyType, but also test DelAnyAssign for completeness. 6318 6319 PR libstdc++/89130 6320 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to 6321 __is_alloc_insertable_impl. Replace single type member with two 6322 members, one for each of copy and move insertable. 6323 (__is_move_insertable): New trait for internal use. 6324 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type)) 6325 (vector::_S_nothrow_relocate(true_type)): New functions to 6326 conditionally check if __relocate_a can throw. 6327 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based 6328 on __is_move_insertable. 6329 (vector::_S_do_relocate): New overloaded functions to conditionally 6330 call __relocate_a. 6331 (vector::_S_relocate): New function that dispatches to _S_do_relocate 6332 based on _S_use_relocate. 6333 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert) 6334 (vector::_M_default_append): Call _S_relocate instead of __relocate_a. 6335 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New. 6336 6337 PR libstdc++/89090 6338 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused 6339 parameter unnamed. Add message to static assertion. 6340 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert) 6341 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr 6342 in C++11 code. 6343 63442019-02-05 Marc Glisse <marc.glisse@inria.fr> 6345 6346 PR libstdc++/87106 6347 * include/bits/stl_uninitialized.h (__is_trivially_relocatable): 6348 Rename... 6349 (__is_bitwise_relocatable): ... to this. 6350 (__relocate_a_1): Adapt. 6351 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename... 6352 (__is_bitwise_relocatable): ... to this. 6353 63542019-01-30 Jonathan Wakely <jwakely@redhat.com> 6355 6356 PR libstdc++/89117 6357 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from 6358 final component as well as from _M_pathname. Append the dot using 6359 operator+= instead of only to _M_pathname. 6360 (path::_M_find_extension): Reformat slightly. 6361 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc: 6362 Add more test cases. 6363 63642019-01-30 Ulrich Drepper <drepper@redhat.com> 6365 6366 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry. 6367 63682019-01-29 Jonathan Wakely <jwakely@redhat.com> 6369 6370 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect 6371 constexpr specifiers from arg and proj. 6372 6373 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for 6374 __shared_ptr instantiations used by gcc4-compatible ABI. 6375 6376 * include/experimental/forward_list (experimental::erase): Qualify 6377 call to erase_if. 6378 * include/experimental/list (experimental::erase): Likewise. 6379 * include/std/forward_list (std::erase): Likewise. 6380 * include/std/list (std::erase): Likewise. 6381 6382 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for 6383 C++2a. 6384 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise. 6385 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise. 6386 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise. 6387 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning. 6388 * testsuite/ext/array_allocator/26875.cc: Likewise. 6389 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise. 6390 * testsuite/util/replacement_memory_operators.h: Likewise. 6391 * testsuite/util/testsuite_allocator.h: Likewise. 6392 6393 * include/std/memory_resource (__pool_resource::_M_unpooled): Use 6394 normal mode vector, even for debug mode. 6395 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector): 6396 Define alias template for normal mode vector. 6397 63982019-01-28 Jonathan Wakely <jwakely@redhat.com> 6399 6400 PR libstdc++/68737 6401 * config/locale/generic/c_locale.h (__convert_from_v) 6402 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF. 6403 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF. 6404 * include/bits/locale_facets.tcc (num_put::_M_insert_float) 6405 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF. 6406 64072019-01-24 Jonathan Wakely <jwakely@redhat.com> 6408 6409 PR libstdc++/88840 6410 * include/bits/stl_vector.h (vector::__use_relocate): Replace static 6411 data member with static member function _S_use_relocate(). 6412 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert) 6413 (vector::_M_default_append): Use _S_use_relocate() instead of 6414 __use_relocate. 6415 6416 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare 6417 sign of results. 6418 64192019-01-22 Jonathan Wakely <jwakely@redhat.com> 6420 6421 PR libstdc++/88740 6422 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to 6423 write to stderr instead of using printf. 6424 64252019-01-21 Jakub Jelinek <jakub@redhat.com> 6426 6427 PR libstdc++/86590 6428 * include/bits/char_traits.h (__constant_string_p, 6429 __constant_char_array_p): Use __builtin_is_constant_evaluated if 6430 available. 6431 64322019-01-20 Ulrich Drepper <drepper@redhat.com> 6433 6434 Implement C++20 P0600r1. 6435 * include/backward/hash_map: Add nodiscard attribute to empty. 6436 * include/backward/hash_set: Likewise. 6437 * backward/hashtable.h: Likewise. 6438 * include/bits/basic_string.h: Likewise. 6439 * include/bits/forward_list.h: Likewise. 6440 * include/bits/hashtable.h: Likewise. 6441 * include/bits/regex.h: Likewise. 6442 * include/bits/stl_deque.h: Likewise. 6443 * include/bits/stl_list.h: Likewise. 6444 * include/bits/stl_map.h: Likewise. 6445 * include/bits/stl_multimap.h: Likewise. 6446 * include/bits/stl_multiset.h: Likewise. 6447 * include/bits/stl_queue.h: Likewise. 6448 * include/bits/stl_set.h: Likewise. 6449 * include/bits/stl_stack.h: Likewise. 6450 * include/bits/stl_tree.h: Likewise. 6451 * include/bits/stl_vector.h: Likewise. 6452 * include/bits/unordered_map.h: Likewise. 6453 * include/bits/unordered_set.h: Likewise. 6454 * include/debug/array: Likewise. 6455 * include/experimental/any: Likewise. 6456 * include/experimental/bits/fs_path.h: Likewise. 6457 * include/experimental/internet: Likewise. 6458 * include/experimental/string_view: Likewise. 6459 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp: 6460 Likewise. 6461 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: 6462 Likewise. 6463 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp: 6464 Likewise. 6465 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: 6466 Likewise. 6467 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp: 6468 Likewise. 6469 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp: 6470 Likewise. 6471 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: 6472 Likewise. 6473 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp: 6474 Likewise. 6475 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ 6476 info_fn_imps.hpp: Likewise. 6477 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ 6478 left_child_next_sibling_heap_.hpp: Likewise. 6479 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp: 6480 Likewise. 6481 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: 6482 Likewise. 6483 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp: 6484 Likewise. 6485 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp: 6486 Likewise. 6487 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp: 6488 Likewise. 6489 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: 6490 Likewise. 6491 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: 6492 Likewise. 6493 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise. 6494 * include/ext/pb_ds/trie_policy.hpp: Likewise. 6495 * include/ext/rope: Likewise. 6496 * include/ext/slist: Likewise. 6497 * include/ext/vstring.h: Likewise. 6498 * include/profile/array: Likewise. 6499 * include/std/array: Likewise. 6500 * include/tr1/array: Likewise. 6501 * include/tr1/hashtable.h: Likewise. 6502 * include/tr1/regex: Likewise. 6503 * include/tr2/dynamic_bitset: Likewise. 6504 * include/bits/alloc_traits.h: Add nodiscard attribute to 6505 allocate. 6506 * include/experimental/memory_resource: Likewise. 6507 * include/ext/alloc_traits.h: Likewise. 6508 * include/ext/array_allocator.h: Likewise. 6509 * include/ext/bitmap_allocator.h: Likewise. 6510 * include/ext/debug_allocator.h: Likewise. 6511 * include/ext/extptr_allocator.h: Likewise. 6512 * include/ext/mt_allocator.h: Likewise. 6513 * include/ext/new_allocator.h: Likewise. 6514 * include/ext/pool_allocator.h: Likewise. 6515 * include/ext/throw_allocator.h: Likewise. 6516 * include/std/scoped_allocator: Likewise. 6517 * libsupc++/eh_alloc.cc: Likewise. 6518 * include/std/future: Add nodiscard attribute to async. 6519 * libsupc++/new: Add nodiscard attribute to new. 6520 65212019-01-18 Jonathan Wakely <jwakely@redhat.com> 6522 6523 PR libstdc++/87514 6524 PR libstdc++/87520 6525 PR libstdc++/88782 6526 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol. 6527 * include/bits/shared_ptr.h 6528 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)) 6529 (allocate_shared): Change to use new tag type. 6530 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq): 6531 Declare new member function. 6532 (_Sp_alloc_shared_tag): Define new type. 6533 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend. 6534 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use 6535 _Sp_make_shared_tag::_S_eq to check type_info. 6536 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)): 6537 Constrain to prevent being called with _Sp_alloc_shared_tag. 6538 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)): 6539 Replace constructor with ... 6540 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use 6541 reference parameter so address of the new object can be returned to 6542 the caller. Obtain the allocator from the tag type. 6543 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace 6544 constructor with ... 6545 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr 6546 to the __shared_count constructor. 6547 (__allocate_shared): Change to use new tag type. 6548 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define. 6549 65502019-01-17 Jonathan Wakely <jwakely@redhat.com> 6551 6552 * src/c++17/fs_ops.cc 6553 (equivalent(const path&, const path&, error_code&)) 6554 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to 6555 compare files instead of relying on incomplete info returned by stat. 6556 6557 PR libstdc++/88884 6558 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing 6559 if the path is already absolute. 6560 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory. 6561 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path. 6562 6563 PR libstdc++/88881 6564 * src/c++17/fs_ops.cc (canonical(const path&, error_code&)) 6565 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour 6566 of filesystem::exists. 6567 (create_directories(const path&, error_code&)): Add assertions. 6568 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: 6569 Add workaround for bug in _wstat for paths with trailing slash. 6570 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust 6571 for expected behaviour on mingw. 6572 * testsuite/experimental/filesystem/operations/create_directories.cc: 6573 Likewise. 6574 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use 6575 "TMP" instead of "TMPDIR" and clean environment before each test. Do 6576 not test permissions on mingw targets. 6577 65782019-01-16 Jonathan Wakely <jwakely@redhat.com> 6579 6580 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream 6581 constructors and open members taking wide strings. Fix patterns for 6582 filesystem::path members to match wstring_view parameters. Add 6583 exports for shared_ptr members used by directory iterators. 6584 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the 6585 error code parameter if the file doesn't exist. 6586 * src/filesystem/ops.cc (remove(const path&, error_code&)): 6587 Likewise. 6588 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected 6589 values for mingw targets, where "/" is not an absolute path. Do not 6590 test symlinks on mingw targets. 6591 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise. 6592 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks 6593 on mingw targets. 6594 * testsuite/experimental/filesystem/operations/copy.cc: Likewise. 6595 * testsuite/27_io/filesystem/operations/create_directories.cc: Check 6596 that each component of the path is created. 6597 * testsuite/experimental/filesystem/operations/create_directories.cc: 6598 Likewise. 6599 * testsuite/27_io/filesystem/operations/exists.cc: Do not test 6600 permissions on mingw targets. 6601 * testsuite/experimental/filesystem/operations/exists.cc: Likewise. 6602 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise. 6603 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise. 6604 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for 6605 mingw targets. 6606 * testsuite/experimental/filesystem/operations/permissions.cc: 6607 Likewise. 6608 * testsuite/27_io/filesystem/operations/remove.cc: Do not test 6609 symlinks or permissions on mingw targets. 6610 * testsuite/experimental/filesystem/operations/remove.cc: Likewise. 6611 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test 6612 symlinks on mingw targets. 6613 * testsuite/experimental/filesystem/operations/remove_all.cc: 6614 Likewise. 6615 * testsuite/27_io/filesystem/operations/status.cc: Do not test 6616 permissions on mingw targets. 6617 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not 6618 test symlinks on mingw targets. 6619 * testsuite/experimental/filesystem/operations/space.cc: Fix test 6620 for mingw targets. 6621 66222019-02-14 Ulrich Drepper <drepper@redhat.com> 6623 6624 PR libstdc++/88738 6625 Warn about unused comparisons of shared_ptr/unique_ptr 6626 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define. 6627 * include/bits/shared_ptr.h: Use it for operator ==, !=, 6628 <, <=, >, >= for shared_ptr. 6629 * include/bits/unique_ptr.h: Likewise for unique_ptr. 6630 66312019-01-15 Jonathan Wakely <jwakely@redhat.com> 6632 6633 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define 6634 as 201611L, because P0497R0 changes are supported. 6635 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise. 6636 6637 * include/bits/erase_if.h [__cplusplus > 201703L] 6638 (__cpp_lib_erase_if): Only define for C++2a. 6639 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG] 6640 (__cpp_lib_null_iterators): Define. 6641 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG] 6642 (__cpp_lib_null_iterators): Define. 6643 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define. 6644 6645 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2 6646 status. 6647 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms): 6648 Define. 6649 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3 6650 changes are supported. 6651 * include/std/optional (__cpp_lib_optional): Likewise. 6652 * include/std/variant (__cpp_lib_variant): Likewise. 6653 * include/std/version [!__STRICT_ANSI__] 6654 (__cpp_lib_uncaught_exceptions): Define as long integer. 6655 [__cplusplus >= 201703L] (__cpp_lib_any) 6656 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions) 6657 (__cpp_lib_variant): Define for C++17. 6658 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define 6659 as long integer. 6660 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long 6661 integer. 6662 6663 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status. 6664 66652019-01-12 Jonathan Wakely <jwakely@redhat.com> 6666 6667 PR libstdc++/88811 6668 PR libstdc++/83306 6669 * src/filesystem/path.cc: Fix typo. If first path is empty, show [] 6670 before second path. 6671 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New 6672 test. 6673 66742019-01-11 Jonathan Wakely <jwakely@redhat.com> 6675 6676 * doc/xml/manual/intro.xml: Include new section. 6677 * doc/xml/manual/status_cxx2017.xml: Document more 6678 implementation-defined properties of the library. 6679 * doc/xml/manual/status_cxx2020.xml: Document C++2a status. 6680 * doc/html/*: Regenerate. 6681 6682 * include/bits/refwrap.h [__cplusplus > 201703L] 6683 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base) 6684 (_Reference_wrapper_base_memfun): Do not define for C++2a. 6685 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun 6686 for C++2a. 6687 (reference_wrapper::operator()): Add static assertion. 6688 * testsuite/20_util/reference_wrapper/incomplete.cc: New test. 6689 6690 * include/std/chrono (duration_values::zero(), duration_values::min()) 6691 (duration_values::max()): Add noexcept. 6692 (duration::zero(), duration::min(), duration::max()): Likewise. 6693 (time_point::zero(), time_point::min(), time_point::max()): Likewise. 6694 * testsuite/20_util/duration/requirements/noexcept.cc: New test. 6695 * testsuite/20_util/time_point/requirements/noexcept.cc: New test. 6696 6697 * include/std/version (__cpp_lib_erase_if): Move to C++20 group. 6698 66992019-01-11 Jakub Jelinek <jakub@redhat.com> 6700 6701 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define. 6702 * include/std/version (__cpp_lib_is_constant_evaluated): Define. 6703 67042019-01-11 Jonathan Wakely <jwakely@redhat.com> 6705 6706 PR libstdc++/88802 6707 * include/bits/functional_hash.h (hash<nullptr_t>): Define 6708 specialization for C++17 (P0513R0, LWG 2817). 6709 * testsuite/20_util/hash/nullptr.cc: New test. 6710 6711 PR libstdc++/88125 6712 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate 6713 pattern for std::basic_stringbuf::str(). 6714 6715 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to 6716 basic_ostream::operator<< patterns. 6717 67182019-01-10 Jonathan Wakely <jwakely@redhat.com> 6719 6720 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix 6721 test failures on targets with 32-bit time_t. 6722 6723 * include/bits/erase_if.h: Define __cpp_lib_erase_if. 6724 * include/std/deque: Likewise. 6725 * include/std/forward_list: Likewise. 6726 * include/std/list: Likewise. 6727 * include/std/string: Likewise. 6728 * include/std/vector: Likewise. 6729 * include/std/version: Likewise. 6730 * testsuite/21_strings/basic_string/erasure.cc: Test macro. 6731 * testsuite/23_containers/deque/erasure.cc: Likewise. 6732 * testsuite/23_containers/forward_list/erasure.cc: Likewise. 6733 * testsuite/23_containers/list/erasure.cc: Likewise. 6734 * testsuite/23_containers/map/erasure.cc: Likewise. 6735 * testsuite/23_containers/set/erasure.cc: Likewise. 6736 * testsuite/23_containers/unordered_map/erasure.cc: Likewise. 6737 * testsuite/23_containers/unordered_set/erasure.cc: Likewise. 6738 * testsuite/23_containers/vector/erasure.cc: Likewise. 6739 6740 * include/experimental/internet [AI_NUMERICSERV] 6741 (resolver_base::numeric_service): Define conditionally. 6742 * testsuite/experimental/net/internet/resolver/base.cc: Test it 6743 conditionally. 6744 * testsuite/experimental/net/internet/resolver/ops/lookup.cc: 6745 Likewise. 6746 67472019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com> 6748 Jonathan Wakely <jwakely@redhat.com> 6749 6750 Implement LWG 2221 6751 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns. 6752 (GLIBCXX_3.4.26): Add new exports. 6753 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to 6754 correct list of sources. 6755 * include/Makefile.in: Regenerate. 6756 * include/std/ostream (operator<<(nullptr_t)): New member function. 6757 * src/c++17/ostream-inst.cc: New file. 6758 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New 6759 test. 6760 67612019-01-10 Jonathan Wakely <jwakely@redhat.com> 6762 6763 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name 6764 of the source file containing the caller. 6765 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove 6766 directories created by test. 6767 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc: 6768 Likewise. 6769 * testsuite/experimental/filesystem/iterators/directory_iterator.cc: 6770 Likewise. 6771 * testsuite/experimental/filesystem/iterators/ 6772 recursive_directory_iterator.cc: Likewise. 6773 67742019-01-10 Jakub Jelinek <jakub@redhat.com> 6775 6776 PR tree-optimization/88775 6777 * include/bits/stl_function.h (greater<_Tp*>::operator(), 6778 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(), 6779 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated 6780 instead of __builtin_constant_p if available. Don't bother with 6781 the pointer comparison in C++11 and earlier. 6782 67832019-01-09 Sandra Loosemore <sandra@codesourcery.com> 6784 6785 PR other/16615 6786 6787 * include/ext/bitmap_allocator.h: Mechanically replace "can not" 6788 with "cannot". 6789 67902019-01-09 Jonathan Wakely <jwakely@redhat.com> 6791 6792 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output 6793 for filesystem::path. Give variables more distinctive names. 6794 6795 * include/std/optional (_Optional_payload_base::_M_copy_assign): New 6796 member function to perform non-trivial assignment. 6797 (_Optional_payload_base::_M_move_assign): Likewise. 6798 (_Optional_payload<T, true, false, true>::operator=) 6799 (_Optional_payload<T, true, true, false>::operator=) 6800 (_Optional_payload<T, true, false, false>::operator=): Call 6801 _M_copy_assign and/or _M_move_assign to do non-trivial assignments. 6802 6803 PR libstdc++/88204 6804 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not 6805 test std::complex<long double> if long double format is IBM128. 6806 * testsuite/26_numerics/complex/requirements/more_constexpr.cc: 6807 Likewise. 6808 68092019-01-08 Jonathan Wakely <jwakely@redhat.com> 6810 6811 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support 6812 for old std::unique_ptr layout. 6813 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test 6814 to become valueless. Add filesystem::path tests. 6815 6816 PR libstdc++/87855 6817 * include/std/optional (_Optional_payload_base): New class template 6818 for common code hoisted from _Optional_payload specializations. Use 6819 a template for the union, to allow a partial specialization for 6820 types with non-trivial destructors. Add constructors for in-place 6821 initialization to the union. 6822 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct 6823 to perform non-trivial copy construction, instead of relying on 6824 non-standard copy elision in a delegating constructor. 6825 (_Optional_payload(bool, _Optional_payload&&)): Likewise for 6826 non-trivial move construction. 6827 (_Optional_payload): Derive from _Optional_payload_base and use it 6828 for everything except the non-trivial assignment operators, which are 6829 defined as needed. 6830 (_Optional_payload<false, C, M>): Derive from the specialization 6831 _Optional_payload<true, false, false> and add a destructor. 6832 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset): 6833 Forward to corresponding members of _Optional_payload. 6834 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get): 6835 Hoist common members from _Optional_base. 6836 (_Optional_base): Make all members and base class public. 6837 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to 6838 _Optional_base_impl. 6839 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add 6840 support for new std::optional layout. 6841 * testsuite/libstdc++-prettyprinters/compat.cc: New test. 6842 6843 PR libstdc++/88066 6844 * include/bits/locale_conv.h: Use <> for includes not "". 6845 * include/ext/random: Likewise. 6846 * include/ext/vstring.h: Likewise. 6847 68482019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 6849 6850 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns. 6851 (GLIBCXX_3.4.21): Likewise. 6852 68532019-01-08 Jonathan Wakely <jwakely@redhat.com> 6854 6855 PR libstdc++/88749 6856 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition 6857 to match the one that controls whether utimbuf and utime are declared. 6858 68592019-01-07 Jonathan Wakely <jwakely@redhat.com> 6860 6861 PR libstdc++/87787 6862 * include/bits/char_traits.h (char_traits::move): Do not pass null 6863 pointers to memmove. 6864 * include/bits/locale_facets.h 6865 (ctype<char>::widen(const char*, const char*, char*)): Do not 6866 pass null pointers to memcpy. 6867 (ctype<char>::narrow(const char*, const char*, char, char*)): 6868 Likewise. 6869 (ctype<char>::do_widen(const char*, const char*, char*)): 6870 Likewise. 6871 (ctype<char>::do_narrow(const char*, const char*, char, char*)): 6872 Likewise. 6873 6874 * doc/xml/manual/spine.xml: Update copyright years. 6875 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs. 6876 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs 6877 for C++17 filesystem library. 6878 * doc/html/*: Regenerate. 6879 6880 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate. 6881 * config.h.in: Regenerate. 6882 * config/abi/pre/gnu.ver: Order patterns for filesystem operations 6883 alphabetically and add missing entries for copy_symlink, 6884 hard_link_count, rename, and resize_file. 6885 * configure: Regenerate. 6886 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is 6887 used unconditionally. 6888 * src/filesystem/ops-common.h (__gnu_posix::truncate) 6889 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only 6890 supports truncating to zero length. 6891 * testsuite/27_io/filesystem/operations/all.cc: New test. 6892 * testsuite/27_io/filesystem/operations/resize_file.cc: New test. 6893 68942019-01-06 Jonathan Wakely <jwakely@redhat.com> 6895 6896 PR libstdc++/86756 6897 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and 6898 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT. 6899 * config.h.in: Regenerate. 6900 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for 6901 remaining std::filesystem types and functions. 6902 * configure: Regenerate. 6903 * src/c++17/Makefile.am: Add C++17 filesystem sources. 6904 * src/c++17/Makefile.in: Regenerate. 6905 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to 6906 here, and change name of included file. 6907 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to 6908 here, and change name of included file. 6909 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change 6910 path to dir-common.h. 6911 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change 6912 path to ops-common.h. Disable -Wunused-parameter warnings. 6913 (internal_file_clock): Define unconditionally. 6914 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not 6915 define. 6916 (do_copy_file, do_space): Move definitions to ops.common.h. 6917 (copy, file_size, hard_link_count, last_write_time, space): Only 6918 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise 6919 report an error. 6920 (last_write_time, read_symlink): Remove unused attributes from 6921 parameters. 6922 * src/filesystem/Makefile.am: Remove C++17 filesystem sources. 6923 * src/filesystem/Makefile.in: Regenerate. 6924 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc. 6925 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc. 6926 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc. 6927 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc. 6928 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define 6929 dummy types and functions instead of using #error. 6930 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error. 6931 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define 6932 in terms of stat. 6933 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions. 6934 (do_copy_file, do_space): Move definitions here from std-ops.cc. 6935 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space 6936 to account for new namespace. 6937 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove 6938 -lstdc++fs from dg-options. 6939 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise. 6940 * testsuite/27_io/filesystem/file_status/1.cc: Likewise. 6941 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise. 6942 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise. 6943 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: 6944 Likewise. 6945 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise. 6946 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc: 6947 Likewise. 6948 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise. 6949 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise. 6950 * testsuite/27_io/filesystem/operations/copy.cc: Likewise. 6951 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise. 6952 * testsuite/27_io/filesystem/operations/create_directories.cc: 6953 Likewise. 6954 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise. 6955 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise. 6956 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise. 6957 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise. 6958 * testsuite/27_io/filesystem/operations/exists.cc: Likewise. 6959 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise. 6960 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise. 6961 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise. 6962 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise. 6963 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise. 6964 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise. 6965 * testsuite/27_io/filesystem/operations/relative.cc: Likewise. 6966 * testsuite/27_io/filesystem/operations/remove.cc: Likewise. 6967 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise. 6968 * testsuite/27_io/filesystem/operations/space.cc: Likewise. 6969 * testsuite/27_io/filesystem/operations/status.cc: Likewise. 6970 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise. 6971 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: 6972 Likewise. 6973 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise. 6974 6975 6976 PR libstdc++/86756 6977 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for 6978 typeinfo and vtables less greedy. 6979 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path. 6980 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc. 6981 * src/c++17/Makefile.in: Regenerate. 6982 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to 6983 here, and change name of included file. 6984 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here. 6985 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc 6986 from sources. 6987 * src/filesystem/Makefile.in: Regenerate. 6988 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc. 6989 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc. 6990 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs 6991 from dg-options and remove dg-require-filesystem-ts. 6992 * testsuite/27_io/filesystem/path/append/source.cc: Likewise. 6993 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise. 6994 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise. 6995 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise. 6996 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise. 6997 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise. 6998 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise. 6999 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise. 7000 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise. 7001 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise. 7002 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise. 7003 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise. 7004 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise. 7005 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise. 7006 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise. 7007 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise. 7008 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise. 7009 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise. 7010 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise. 7011 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise. 7012 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: 7013 Likewise. 7014 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise. 7015 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise. 7016 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise. 7017 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise. 7018 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise. 7019 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise. 7020 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise. 7021 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise. 7022 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise. 7023 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise. 7024 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise. 7025 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc: 7026 Likewise. 7027 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc: 7028 Likewise. 7029 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc: 7030 Likewise. 7031 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc: 7032 Likewise. 7033 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise. 7034 * testsuite/27_io/filesystem/path/native/string.cc: Likewise. 7035 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise. 7036 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise. 7037 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise. 7038 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise. 7039 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise. 7040 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise. 7041 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise. 7042 * testsuite/27_io/filesystem/path/query/has_root_directory.cc: 7043 Likewise. 7044 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise. 7045 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise. 7046 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise. 7047 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise. 7048 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise. 7049 7050 PR libstdc++/87431 7051 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid): 7052 Check is_trivially_copyable instead of is_scalar. 7053 (variant::emplace<N, Args>(Args&&...)): If construction of the new 7054 contained value can throw and its type is trivially copyable then 7055 construct into a temporary variant and move from it, to provide the 7056 strong exception safety guarantee. 7057 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)): 7058 Likewise. 7059 * testsuite/20_util/variant/87431.cc: New test. 7060 * testsuite/20_util/variant/run.cc: Adjust test so that throwing 7061 conversion causes valueless state. 7062 7063 PR libstdc++/88607 7064 * testsuite/17_intro/headers/c++1998/charset.cc: New test. 7065 * testsuite/17_intro/headers/c++2011/charset.cc: New test. 7066 * testsuite/17_intro/headers/c++2014/charset.cc: New test. 7067 * testsuite/17_intro/headers/c++2017/charset.cc: New test. 7068 * testsuite/17_intro/headers/c++2020/charset.cc: New test. 7069 70702019-01-05 Jonathan Wakely <jwakely@redhat.com> 7071 7072 * include/bits/fs_fwd.h (__file_clock): Define new clock. 7073 (file_time_type): Redefine in terms of __file_clock. 7074 * src/filesystem/ops-common.h (file_time): Add FIXME comment about 7075 overflow. 7076 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give 7077 internal linkage. 7078 (internal_file_lock): New helper type for accessing __file_clock. 7079 (do_copy_file): Use internal_file_lock to convert system time to 7080 file_time_type. 7081 (last_write_time(const path&, error_code&)): Likewise. 7082 (last_write_time(const path&, file_time_type, error_code&)): Likewise. 7083 70842019-01-04 Jonathan Wakely <jwakely@redhat.com> 7085 7086 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy 7087 for const member functions of std::basic_string. 7088 (GLIBCXX_3.4.26): Export member functions of std::basic_string added 7089 in C++17. 7090 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)): 7091 Make non-standard constructor private. 7092 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)): 7093 Likewise. 7094 * include/bits/basic_string.tcc (std::string, std::wstring): Declare 7095 explicit instantiations for C++17 as well as earlier dialects. 7096 * src/c++17/Makefile.am: Add new source files. 7097 * src/c++17/Makefile.in: Regenerate. 7098 * src/c++17/cow-string-inst.cc: New file defining explicit 7099 instantiations for basic_string member functions added in C++17. 7100 * src/c++17/string-inst.cc: Likewise. 7101 7102 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended 7103 copy/move constructors for old std::basic_string. 7104 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI] 7105 (basic_string::reference, basic_string::const_reference): Define 7106 as plain references for C++11 and later. 7107 (basic_string::basic_string()): Put constructor body outside 7108 preprocessor conditional groups. 7109 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider 7110 instead of copying it. 7111 (basic_string::basic_string(const basic_string&, const _Alloc&)): 7112 Define. 7113 (basic_string::basic_string(basic_string&&, const _Alloc&)): 7114 Define. 7115 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special 7116 cases for old basic_string. 7117 * testsuite/21_strings/basic_string/cons/char/8.cc: Test 7118 allocator-extended constructors unconditionally. Add extra members to 7119 allocator type when using old string ABI. 7120 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test 7121 for old string ABI. 7122 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise. 7123 7124 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when 7125 -fno-inline added to test flags. 7126 7127 * testsuite/21_strings/basic_string/requirements/ 7128 explicit_instantiation/debug.cc: Remove XFAIL for old ABI. 7129 7130 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static 7131 assertion failures with old std::string ABI. 7132 7133 * include/bits/fs_path.h (path::_List::erase): Replace both overloads 7134 with ... 7135 (path::pop_back(), path::_M_erase_from(const_iterator)): New member 7136 functions that will only erase elements at the end. 7137 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define. 7138 (path::_List::_Impl::_M_erase_from(const_iterator)): Define. 7139 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead 7140 of erase(p, end()). 7141 (path::_List::pop_back()): Define. 7142 (path::_List::_M_erase_from(const_iterator)): Define. 7143 (path::operator/=(const path&)): Use pop_back to remove last component 7144 and _M_erase_from to remove multiple components. 7145 (path::_M_append(basic_string_view<value_type>)): Likewise. 7146 (path::operator+=(const path&)): Likewise. 7147 (path::_M_concat(basic_string_view<value_type>)): Likewise. 7148 (path::remove_filename()): Likewise. 7149 (path::lexically_normal()): Use _List::_Impl iterators instead of 7150 path::iterator. Use pop_back to remove components from the end. Clear 7151 trailing filename, instead of using erase(const_iterator) to remove 7152 a non-final component. 7153 * testsuite/27_io/filesystem/path/generation/normal.cc: Test 7154 additional cases. 7155 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test. 7156 7157 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix 7158 incorrect treatment of empty filename after trailing slash. 7159 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case. 7160 7161 * testsuite/21_strings/basic_string/modifiers/assign/char/ 7162 move_assign_optim.cc: Avoid spurious failure when -fno-inline added 7163 to test flags. 7164 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/ 7165 move_assign_optim.cc: Likewise. 7166 71672019-01-03 Jonathan Wakely <jwakely@redhat.com> 7168 Jakub Jelinek <jakub@redhat.com> 7169 7170 PR libstdc++/88607 7171 * include/experimental/memory: Replace UTF-8 quote characters. 7172 * include/std/future: Replace UTF-8 "em dash" characters. 7173 71742019-01-03 Jonathan Wakely <jwakely@redhat.com> 7175 7176 PR libstdc++/88607 7177 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character. 7178 * include/debug/forward_list: Likewise. 7179 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign" 7180 character. 7181 * include/experimental/chrono: Likewise. 7182 * include/experimental/functional: Likewise. 7183 * include/experimental/ratio: Likewise. 7184 * include/experimental/system_error: Likewise. 7185 * include/experimental/tuple: Likewise. 7186 * include/experimental/type_traits: Likewise. 7187 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character. 7188 * include/parallel/multiseq_selection.h: Likewise. 7189 7190 PR libstdc++/88681 7191 * config/abi/pre/gnu.ver: Add missing exports. 7192 * testsuite/22_locale/collate_byname/88681.cc: New test. 7193 * testsuite/22_locale/time_get/get/char/88681.cc: New test. 7194 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test. 7195 71962019-01-02 Jonathan Wakely <jwakely@redhat.com> 7197 7198 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from 7199 initializer_list<value_type> and from input iterator ranges. 7200 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise. 7201 7202 * testsuite/experimental/string_view/element_access/char/empty.cc: 7203 Fix year range in copyright header. 7204 72052019-01-02 Joel Brobecker <brobecker@adacore.com> 7206 7207 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc: 7208 Fix year range in copyright header. 7209 72102019-01-01 Jakub Jelinek <jakub@redhat.com> 7211 7212 Update copyright years. 7213 7214Copyright (C) 2019-2020 Free Software Foundation, Inc. 7215 7216Copying and distribution of this file, with or without modification, 7217are permitted in any medium without royalty provided the copyright 7218notice and this notice are preserved. 7219