blob: 385291428456b488366bd02afa3f1438de9de548 [file] [log] [blame]
2021-10-14 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (__variant::__get(in_place_index_t<N>, U&&)):
Rename to __get_n and remove first argument. Replace pair of
overloads with a single function using 'if constexpr'.
(__variant::__get(Variant&&)): Adjust to use __get_n.
2021-10-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (path(path&&)): Make unconditionally
noexcept.
(path::_S_convert(T)): Add condtional noexcept.
2021-10-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102743
* include/bits/fs_path.h (path::_S_convert(T)): Fix condition
for returning the same string unchanged.
2021-10-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h: Check __cpp_inline_variables instead of
__cplusplus.
2021-10-14 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/is_layout_compatible/version.cc: Check
correct macro.
2021-10-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_construct.h (_Construct): Use
std::construct_at when constant evaluated.
* include/std/optional (_Storage, _Optional_payload, optional):
Add constexpr as specified by P2231R1.
* include/std/version (__cpp_lib_optional): Update value for
C++20.
* testsuite/20_util/optional/requirements.cc: Check feature test
macro.
* testsuite/20_util/optional/constexpr/assign.cc: New test.
* testsuite/20_util/optional/constexpr/cons/conv.cc: New test.
* testsuite/20_util/optional/constexpr/modifiers.cc: New test.
* testsuite/20_util/optional/constexpr/swap.cc: New test.
* testsuite/20_util/optional/version.cc: New test.
2021-10-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (__detail::__is_contiguous): Add
partial specializations for pointers and __normal_iterator.
2021-10-13 Jonathan Wakely <jwakely@redhat.com>
* testsuite/27_io/filesystem/path/construct/102592.C: Moved to...
* testsuite/27_io/filesystem/path/construct/102592.cc: ...here.
* testsuite/28_regex/match_results/102667.C: Moved to...
* testsuite/28_regex/match_results/102667.cc: ...here.
2021-10-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (__detail::__is_contiguous): New
variable template to identify contiguous iterators.
(__detail::__unified_char8_t): New alias template to decide when
to treat char8_t as char without encoding conversion.
(__detail::__effective_range(const basic_string<C,T>&)): Use
std::char_traits<C> for returned string view.
(__detail::__effective_range(const basic_string_view<C,T>&)):
Likewise.
(__detail::__effective_range(const Source&)): Use
__is_contiguous to detect mode cases of contiguous iterators.
Use __unified_char8_t to return a std::string instead of
std::u8string.
2021-10-13 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102592
* include/bits/fs_path.h (path::path(Iter, Iter, format))
(path::append(Iter, Iter), path::concat(Iter, Iter)): Call
__string_from_range directly, instead of two-argument overload
of _S_convert.
(path::_S_convert(Iter, Iter)): Remove.
* testsuite/27_io/filesystem/path/construct/102592.C: New test.
2021-10-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/c++config (__terminate): Add extern "C++".
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/tuple/comparison_operators/overloaded.cc:
Restore test for operator<.
* testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
Adjust expected errors for C++20.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101960
* include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Define as
defauled.
* testsuite/20_util/tuple/cons/101960.cc: Check tuples with
array elements before the last element.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator_base_funcs.h (__advance): Add
deleted overload to improve diagnostics.
(__distance): Likewise.
2021-10-11 Jonathan Wakely <jwakely@redhat.com>
* include/bits/atomic_timed_wait.h: Remove unused header.
* include/bits/c++config (std:__terminate): Define.
* include/bits/semaphore_base.h: Remove <exception> and use
__terminate instead of terminate.
* include/bits/std_thread.h: Likewise.
* libsupc++/eh_terminate.cc (std::terminate): Use qualified-id
to call __cxxabiv1::__terminate.
2021-10-11 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (basic_regex::assign(Iter, Iter)): Avoid
std::__to_address by using poitner directly or using base()
member of __normal_iterator.
2021-10-11 Jonathan Wakely <jwakely@redhat.com>
* testsuite/18_support/numeric_limits/lowest.cc: Use
numeric_limits<T>::is_integer instead of is_integral<T>::value.
2021-10-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/89927
* include/bits/regex.h (basic_regex(const _Ch_type*, size_t)):
Add __glibcxx_requires_string_len assertion.
(basic_regex::assign(InputIterator, InputIterator)): Add
__glibcxx_requires_valid_range assertion.
* include/bits/regex_scanner.tcc (_Scanner::_M_advance())
(_Scanner::_M_scan_normal()): Use string literal in assertions.
2021-10-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102667
* include/bits/regex.h (match_result::empty()): Optimize by
calling the base function directly.
(match_results::end()): Check _Base_type::empty() not empty().
* testsuite/28_regex/match_results/102667.C: New test.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/98725
* testsuite/18_support/numeric_limits/lowest.cc: Remove use of
_GLIBCXX_USE_WCHAR_T.
* testsuite/18_support/numeric_limits/min_max.cc: Replace use of
_GLIBCXX_USE_WCHAR_T with checks for WCHAR_MIN and WCHAR_MAX.
* testsuite/20_util/from_chars/1_neg.cc: Remove use of
_GLIBCXX_USE_WCHAR_T.
* testsuite/20_util/function_objects/searchers.cc: Likewise. Use
char_traits<wchar_t>::length instead of wcslen.
* testsuite/20_util/hash/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_arithmetic/value.cc: Likewise.
* testsuite/20_util/is_compound/value.cc: Likewise.
* testsuite/20_util/is_floating_point/value.cc: Likewise.
* testsuite/20_util/is_fundamental/value.cc: Likewise.
* testsuite/20_util/is_integral/value.cc: Likewise.
* testsuite/20_util/is_signed/value.cc: Likewise.
* testsuite/20_util/is_unsigned/value.cc: Likewise.
* testsuite/20_util/is_void/value.cc: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-1.cc:
Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-2.cc:
Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-3.cc:
Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-4.cc:
Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs-3.cc:
Likewise.
* testsuite/20_util/to_chars/3.cc: Likewise.
* testsuite/20_util/type_identity/requirements/typedefs.cc:
Likewise.
* testsuite/21_strings/basic_string/hash/debug.cc: Likewise.
* testsuite/21_strings/basic_string/hash/hash.cc: Likewise.
* testsuite/21_strings/basic_string/literals/types-char8_t.cc:
Likewise.
* testsuite/21_strings/basic_string/literals/types.cc: Likewise.
* testsuite/21_strings/basic_string/literals/values-char8_t.cc:
Likewise.
* testsuite/21_strings/basic_string/literals/values.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/64422.cc:
Likewise.
* testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string/requirements/citerators.cc:
Likewise.
* testsuite/21_strings/basic_string/requirements/typedefs.cc:
Likewise.
* testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
Likewise.
* testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
Likewise.
* testsuite/21_strings/basic_string_view/literals/types.cc:
Likewise.
* testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
Likewise.
* testsuite/21_strings/basic_string_view/literals/values.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
Likewise.
* testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
* testsuite/21_strings/char_traits/requirements/constexpr_functions.cc:
Likewise.
* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
Likewise.
* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
Likewise.
* testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
* testsuite/25_algorithms/fill/4.cc: Likewise.
* testsuite/25_algorithms/fill_n/1.cc: Likewise.
* testsuite/experimental/functional/searchers.cc: Likewise. Use
char_traits<wchar_t>::length instead of wcslen.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
Likewise.
* testsuite/experimental/string_view/literals/types-char8_t.cc:
Likewise.
* testsuite/experimental/string_view/literals/types.cc:
Likewise.
* testsuite/experimental/string_view/literals/values-char8_t.cc:
Likewise.
* testsuite/experimental/string_view/literals/values.cc:
Likewise.
* testsuite/experimental/string_view/range_access/wchar_t/1.cc:
Likewise.
* testsuite/experimental/string_view/requirements/typedefs.cc:
Likewise.
* testsuite/experimental/string_view/typedefs.cc: Likewise.
* testsuite/ext/vstring/range_access.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc:
Likewise.
* testsuite/tr1/4_metaprogramming/is_arithmetic/value.cc:
Likewise.
* testsuite/tr1/4_metaprogramming/is_compound/value.cc:
Likewise.
* testsuite/tr1/4_metaprogramming/is_floating_point/value.cc:
Likewise.
* testsuite/tr1/4_metaprogramming/is_fundamental/value.cc:
Likewise.
* testsuite/tr1/4_metaprogramming/is_integral/value.cc:
Likewise.
* testsuite/tr1/4_metaprogramming/is_signed/value.cc: Likewise.
* testsuite/tr1/4_metaprogramming/is_unsigned/value.cc:
Likewise.
* testsuite/tr1/4_metaprogramming/is_void/value.cc: Likewise.
* testsuite/tr1/6_containers/hash/24799.cc: Likewise.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/98725
* include/std/ostream (operator<<(basic_ostream<char, Tr>&, wchar_t))
(operator<<(basic_ostream<char, Tr>&, const wchar_t*)): Always
define as deleted. Do not check _GLIBCXX_USE_WCHAR_T.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/98725
* include/bits/locale_conv.h (wstring_convert, wbuffer_convert):
Define unconditionally. Do not check _GLIBCXX_USE_WCHAR_T.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/98725
* include/c_global/cstddef [!_GLIBCXX_USE_WCHAR_T]
(__byte_operand<wchar_t>): Define specialization.
* include/std/type_traits (__make_signed<wchar_t>)
(__make_unsigned<wchar_t>): Remove redundant check for
__WCHAR_TYPE__ being defined.
* include/tr1/type_traits [!_GLIBCXX_USE_WCHAR_T]
(__is_integral_helper<wchar_t>): Likewise.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/98725
* include/ext/rc_string_base.h [!_GLIBCXX_USE_WCHAR_T]
(__rc_string_base<wchar_t>): Define member function.
* include/ext/vstring.h [!_GLIBCXX_USE_WCHAR_T]
(hash<__gnu_cxx::__wvstring>): Define specialization.
* include/ext/vstring_fwd.h [!_GLIBCXX_USE_WCHAR_T] (__wvstring)
(__wsso_string, __wrc_string): Declare typedefs.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/98725
* include/bits/char_traits.h (char_traits<wchar_t>): Define
explicit specialization unconditionally.
* include/bits/basic_string.h (hash<wstring>): Define
unconditionally. Do not check _GLIBCXX_USE_WCHAR_T.
* include/bits/stringfwd.h (wstring): Likewise.
* include/debug/string (wstring): Likewise.
* include/experimental/string_view (experimental::wstring_view)
(hash<experimental::wstring_view>): Likewise.
* include/std/string (pmr::wstring, hash<pmr::wstring>):
Likewise.
* include/std/string_view (wstring_view, hash<wstring_view>):
Likewise.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
* testsuite/27_io/basic_filebuf/close/81256.cc: Moved to...
* testsuite/27_io/basic_filebuf/close/wchar_t/81256.cc: ...here.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
* testsuite/22_locale/conversions/buffer/1.cc: Check
_GLIBCXX_USE_WCHAR_T.
* testsuite/22_locale/conversions/buffer/3.cc: Likewise. Add
test using char16_t.
* testsuite/22_locale/conversions/string/1.cc: Check
_GLIBCXX_USE_WCHAR_T.
* testsuite/27_io/filesystem/path/generic/generic_string.cc:
Likewise.
* testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
Likewise.
* testsuite/27_io/filesystem/path/native/alloc.cc: Likewise.
* testsuite/27_io/filesystem/path/native/string-char8_t.cc:
Likewise.
* testsuite/27_io/filesystem/path/native/string.cc: Likewise.
* testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
Likewise.
* testsuite/experimental/filesystem/path/generic/generic_string.cc:
Likewise.
* testsuite/experimental/filesystem/path/native/alloc.cc:
Likewise.
* testsuite/experimental/filesystem/path/native/string-char8_t.cc:
Likewise.
* testsuite/experimental/filesystem/path/native/string.cc:
Likewise.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
* testsuite/26_numerics/bit/bit.rotate/rotr.cc:
* testsuite/util/testsuite_common_types.h:
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
* testsuite/18_support/numeric_limits/40856.cc: Replace use of
_GLIBCXX_USE_INT128.
* testsuite/18_support/numeric_limits/dr559.cc: Likewise.
* testsuite/18_support/numeric_limits/lowest.cc: Likewise.
* testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
* testsuite/20_util/is_floating_point/value.cc: Likewise.
* testsuite/20_util/is_integral/value.cc: Likewise.
* testsuite/20_util/is_signed/value.cc: Likewise.
* testsuite/20_util/is_unsigned/value.cc: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-1.cc:
Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-2.cc:
Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
Likewise.
* testsuite/20_util/type_identity/requirements/typedefs.cc:
Likewise.
* testsuite/26_numerics/bit/bit.count/countl_one.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc:
Likewise.
* testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
* include/bits/hashtable_policy.h (_Select1st): Replace use of
std::get.
(_Select2nd): Remove.
(_NodeBuilder::_S_build): Use _NodeGenerator::__node_type
typedef instead of deducing it. Remove unnecessary piecewise
construction.
(_ReuseOrAllocNode): Make __node_type public.
(_Map_base): Adjust partial specialization to be able to extract
the mapped_type without using tuple_element.
(_Map_base::at): Define inline
* testsuite/23_containers/unordered_map/requirements/53339.cc:
Remove XFAIL.
* testsuite/23_containers/unordered_multimap/requirements/53339.cc:
Likewise.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
* include/bits/hashtable.h: Move static assertion to destructor.
* include/bits/hashtable_policy.h: Deduce value type from node
type without instantiating it.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/limits.cc: Fail if __cpp_inline_variables is
defined.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/92546
* include/bits/ranges_algobase.h: Replace <iterator> with a
subset of the headers it includes.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/deque (erase, erase_if): Revert changes
to avoid debug mode overhead.
* include/experimental/map (erase, erase_if): Likewise.
* include/experimental/set (erase, erase_if): Likewise.
* include/experimental/unordered_map (erase, erase_if):
Likewise.
* include/experimental/unordered_set (erase, erase_if):
Likewise.
* include/experimental/vector (erase, erase_if): Likewise.
* include/std/deque (erase, erase_if): Likewise.
* include/std/map (erase, erase_if): Likewise.
* include/std/set (erase, erase_if): Likewise.
* include/std/unordered_map (erase, erase_if): Likewise.
* include/std/unordered_set (erase, erase_if): Likewise.
* include/std/vector (erase, erase_if): Likewise.
2021-10-08 Jonathan Wakely <jwakely@redhat.com>
* include/std/chrono (__detail::__units_suffix_misc): New
helper function.
(__detail::__units_suffix): Likewise.
(chrono::operator<<(basic_ostream&, const duration&)): Define.
* testsuite/20_util/duration/io.cc: New test.
2021-10-07 Jonathan Wakely <jwakely@redhat.com>
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/std/chrono (duration, time_point, system_clock)
(steady_clock, high_resolution_clock, chrono_literals, sys_time)
(file_clock, file_time): Move to ...
* include/bits/chrono.h: New file.
* include/bits/atomic_futex.h: Include new header instead of
<chrono>.
* include/bits/atomic_timed_wait.h: Likewise.
* include/bits/fs_fwd.h: Likewise.
* include/bits/semaphore_base.h: Likewise.
* include/bits/this_thread_sleep.h: Likewise.
* include/bits/unique_lock.h: Likewise.
* include/experimental/bits/fs_fwd.h: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/io_context: Likewise.
* include/experimental/netfwd: Likewise.
* include/experimental/timer: Likewise.
* include/std/condition_variable: Likewise.
* include/std/mutex: Likewise.
* include/std/shared_mutex: Likewise.
2021-10-07 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102377
* include/bits/atomic_wait.h (__waiter_pool_base:_S_align):
Hardcode to 64 instead of using non-constant constant.
2021-10-07 Jonathan Wakely <jwakely@redhat.com>
* include/bits/erase_if.h (__erase_nodes_if): Remove redundant
__niter_base calls.
* include/std/string (erase, erase_if): Likewise.
* include/std/deque (erase, erase_if): Access non-debug
container directly.
* include/std/map (erase, erase_if): Likewise.
* include/std/set (erase, erase_if): Likewise.
* include/std/unordered_map (erase, erase_if): Likewise.
* include/std/unordered_set (erase, erase_if): Likewise.
* include/std/vector (erase, erase_if): Likewise.
* include/experimental/deque (erase, erase_if): Likewise.
* include/experimental/map (erase, erase_if): Likewise.
* include/experimental/set (erase, erase_if): Likewise.
* include/experimental/unordered_map (erase, erase_if):
Likewise.
* include/experimental/unordered_set (erase, erase_if):
Likewise.
* include/experimental/vector (erase, erase_if): Likewise.
2021-10-06 Jonathan Wakely <jwakely@redhat.com>
* include/Makefile.am: Add new headers.
* include/Makefile.in: Regenerate.
* include/std/functional: Include <bits/move_only_function.h>.
* include/std/version (__cpp_lib_move_only_function): Define.
* include/bits/mofunc_impl.h: New file.
* include/bits/move_only_function.h: New file.
* testsuite/20_util/move_only_function/call.cc: New test.
* testsuite/20_util/move_only_function/cons.cc: New test.
* testsuite/20_util/move_only_function/move.cc: New test.
* testsuite/20_util/move_only_function/version.cc: New test.
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string_view/requirements/trivially_copyable.cc:
New test.
* testsuite/23_containers/span/trivially_copyable.cc: New test.
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/utility.h (__is_in_place_type_v): Define
variable template to detect in_place_type_t specializations.
(__is_in_place_type): Replace class template with alias
template using __is_in_place_type_v.
* include/std/any (any(T&&)): Check __is_in_place_type first and
avoid instantiating is_copy_constructible unnecessarily.
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/integer_comparisons/greater.cc: New test.
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
* testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc:
Check result matches non-volatile pointer.
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
PR c++/102535
* testsuite/20_util/is_trivially_constructible/value.cc: Adjust
expected value for C++20.
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_function.h (_Any_data::_M_access): Add
noexcept.
(_Function_base::_Base_manager::_M_get_pointer): Likewise.
(_Function_base::_Base_manager::_M_not_empty_function):
Likewise.
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
* include/std/ostream (operator<<(const volatile void*)):
Add new overload, as per P1147R1.
* testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc:
New test.
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_queue.h
(__cpp_lib_adaptor_iterator_pair_constructor): Set to correct
value.
* include/bits/stl_stack.h
(__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
* include/std/version
(__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
* testsuite/23_containers/queue/cons_from_iters.cc: Update
expected value.
* testsuite/23_containers/stack/cons_from_iters.cc: Likewise.
2021-10-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/forward_list.h (forward_list): Use non-deduced
context for allocator parameter of allocator-extended copy and
move constructors.
* include/bits/stl_bvector.h (vector<bool>): Likewise.
* include/bits/stl_deque.h (deque): Likewise.
* include/bits/stl_list.h (list): Likewise.
* include/bits/stl_map.h (map): Likewise.
* include/bits/stl_multimap.h (multimap): Likewise.
* include/bits/stl_multiset.h (multiset): Likewise.
* include/bits/stl_set.h (set): Likewise.
* include/bits/stl_vector.h (vector): Likewise.
* include/bits/stl_queue.h (queue, priority_queue): Do not
constrain Allocator template parameter of deduction guides that
have a Container parameter.
* include/bits/stl_stack.h (stack): Likewise.
* include/debug/deque (__gnu_debug::deque): Use non-deduced
context for allocator parameter of allocator-extended copy and
move constructors.
* include/debug/list (__gnu_debug::list): Likewise.
* include/debug/map.h (__gnu_debug::map): Likewise.
* include/debug/multimap.h (__gnu_debug::multimap): Likewise.
* include/debug/multiset.h (__gnu_debug::multiset): Likewise.
* include/debug/set.h (__gnu_debug::set): Likewise.
* include/debug/vector (__gnu_debug::vector): Likewise.
* testsuite/23_containers/deque/cons/deduction.cc: Test class
template argument deduction with non-deduced allocator
arguments.
* testsuite/23_containers/forward_list/cons/deduction.cc:
Likewise.
* testsuite/23_containers/list/cons/deduction.cc: Likewise.
* testsuite/23_containers/map/cons/deduction.cc: Likewise.
* testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
* testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
* testsuite/23_containers/priority_queue/deduction.cc: Likewise.
* testsuite/23_containers/queue/deduction.cc: Likewise.
* testsuite/23_containers/set/cons/deduction.cc: Likewise.
* testsuite/23_containers/stack/deduction.cc: Likewise.
* testsuite/23_containers/unordered_map/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_set/cons/deduction.cc:
Likewise.
* testsuite/23_containers/vector/cons/deduction.cc: Likewise.
2021-10-04 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (__detail::__variant::__as): Add missing
noexcept to first overload.
2021-10-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/basic_string.h (basic_string(nullptr_t)): Define
as deleted.
(operator=(nullptr_t)): Likewise.
* include/bits/cow_string.h (basic_string(nullptr_t)): Likewise.
(operator=(nullptr_t)): Likewise.
* include/std/string_view (basic_string_view(nullptr_t)):
Likewise.
* testsuite/21_strings/basic_string/cons/char/nullptr.cc: New test.
* testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
Change dg-warning to dg-error.
* testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
Likewise.
2021-10-02 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_ops.cc (create_directory): Fix typo in enum name.
* src/filesystem/ops-common.h (__last_system_error): Add
explicit cast to avoid narrowing conversion.
(do_space): Fix type in function name.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102100
* include/Makefile.am (c++config.h): Define
_GLIBCXX_VERBOSE_ASSERT based on configure output.
* include/Makefile.in: Regenerate.
* include/bits/c++config: Fix condition for verbose assertions.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/92546
* include/bits/erase_if.h (__erase_nodes_if): Use __niter_base to
unwrap debug iterators.
* include/bits/refwrap.h: Do not error if included in C++03.
* include/bits/stl_algo.h (__remove_if): Move to ...
* include/bits/stl_algobase.h (__remove_if): ... here.
* include/std/deque (erase, erase_if): Use __remove_if instead of
remove and remove_if.
* include/std/string (erase, erase_if): Likewise.
* include/std/vector (erase, erase_if): Likewise.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/66742
* include/bits/list.tcc (list::sort()): Use _Scratch_list
objects for splicing and merging.
(list::sort(StrictWeakOrdering)): Likewise.
* include/bits/stl_list.h (__detail::_Scratch_list): New type.
* src/c++98/list.cc (_List_node_base::_M_transfer): Add
assertion for --enable-libstdcxx-debug library.
* testsuite/23_containers/list/operations/66742.cc: New test.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100612
* include/std/thread (__pmf_expects_stop_token): New variable
template to detect a pointer to member function that needs a
stop_token to be added to the arguments.
(jthread::__S_create): Use __pmf_expects_stop_token.
(jthread::__S_create_pmf): New function.
* testsuite/30_threads/jthread/100612.cc: New test.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_queue.h
(__cpp_lib_adaptor_iterator_pair_constructor): Define for C++23, as
per P1425R4.
(queue(InputIterator, InputIterator)): Likewise.
(queue(InputIterator, InputIterator, const Alloc&)): Likewise.
* include/bits/stl_stack.h
(__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
(stack(InputIterator, InputIterator)): Likewise.
(stack(InputIterator, InputIterator, const Alloc&)): Likewise.
* include/std/version (__cpp_lib_adaptor_iterator_pair_constructor):
Define.
* testsuite/23_containers/queue/cons_from_iters.cc: New test.
* testsuite/23_containers/stack/cons_from_iters.cc: New test.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_queue.h (priority_queue): Add
allocator-extended overloads for constructors taking iterator.
* testsuite/23_containers/priority_queue/lwg3506.cc: New test.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_queue.h (priority_queue): Construct sequence
from iterators when no sequence argument is present (LWG 3529).
* testsuite/23_containers/priority_queue/lwg3529.cc: New test.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_queue.h (priority_queue): Constrain
constructors with InputIterator parameters (LWG 3522).
* testsuite/23_containers/priority_queue/lwg3522.cc: New test.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h (ranges::distance): Split overload
into two (LWG 3392).
* testsuite/24_iterators/range_operations/lwg3392.cc: New test.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* testsuite/30_threads/thread/cons/3.cc: Remove derivation from
std::unary_function.
* testsuite/30_threads/thread/cons/4.cc: Likewise.
* testsuite/30_threads/thread/cons/5.cc: Likewise.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* testsuite/ext/pb_ds/example/basic_multimap.cc: Remove
unnecesary derivation from std::unary_function.
* testsuite/ext/pb_ds/example/erase_if.cc: Likewise.
* testsuite/ext/pb_ds/example/hash_illegal_resize.cc: Likewise.
* testsuite/ext/pb_ds/example/hash_initial_size.cc: Likewise.
* testsuite/ext/pb_ds/example/hash_load_set_change.cc: Likewise.
* testsuite/ext/pb_ds/example/hash_mod.cc: Likewise.
* testsuite/ext/pb_ds/example/hash_resize.cc: Likewise.
* testsuite/ext/pb_ds/example/hash_shift_mask.cc: Likewise.
* testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc:
Likewise.
* testsuite/ext/pb_ds/example/ranged_hash.cc: Likewise.
* testsuite/ext/pb_ds/example/store_hash.cc: Likewise.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/functexcept.cc (__throw_out_of_range_fmt): Do not
expand the format string for freestanding, or non-vebose, or if
we're just going to abort anyway.
* src/c++11/snprintf_lite.cc: Remove unused header and
declaration.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (__do_visit): Use variant_npos instead of
literal -1 that requires a narrowing conversion.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/99327
* src/filesystem/ops-common.h (__unsupported): New function to
return a suitable error code for missing functionality.
(posix::off_t): New typedef.
(posix::*): Set errno to ENOSYS instead of ENOTSUP for no-op
fallback implementations.
(do_copy_file): Replace uses of errc::not_supported.
* src/c++17/fs_ops.cc (fs::copy, fs::copy_file, create_dir)
(fs::create_directory, fs::create_directory_symlink)
(fs::create_hard_link, fs::create_symlink, fs::current_path)
(fs::equivalent, do_stat, fs::file_size, fs::hard_link_count)
(fs::last_write_time, fs::permissions, fs::read_symlink):
Replace uses of errc::not_supported.
(fs::resize_file): Qualify off_t.
* src/filesystem/ops.cc (fs::copy, fs::copy_file, create_dir)
(fs::create_directory, fs::create_directory_symlink)
(fs::create_hard_link, fs::create_symlink, fs::current_path)
(fs::equivalent, do_stat, fs::file_size, fs::last_write_time)
(fs::permissions, fs::read_symlink, fs::system_complete):
Replace uses of errc::not_supported.
(fs::resize_file): Qualify off_t and enable unconditionally.
* testsuite/19_diagnostics/system_error/cons-1.cc: Likewise.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* src/filesystem/ops-common.h (last_error): New helper function.
(filesystem::do_space): Use last_error().
* src/c++17/fs_ops.cc (fs::absolute, fs::create_hard_link)
(fs::equivalent, fs::remove, fs::temp_directory_path): Use
last_error().
* src/filesystem/ops.cc (fs::create_hard_link)
(fs::remove, fs::temp_directory_path): Likewise.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (__conditional): New class template
for internal uses of std::conditional.
(__conditional_t): New alias template to replace conditional_t.
(__and_, __or_, __result_of_memfun, __result_of_memobj): Use
__conditional_t instead of conditional::type.
* include/bits/atomic_base.h (__atomic_impl::_Diff): Likewise.
* include/bits/hashtable.h (_Hashtable): Likewise.
* include/bits/hashtable_policy.h (_Node_iterator, _Insert_base)
(_Local_iterator): Likewise. Replace typedefs with
using-declarations.
* include/bits/move.h (move_if_noexcept): Use __conditional_t.
* include/bits/parse_numbers.h (_Select_int_base): Likewise.
* include/bits/ptr_traits.h (__make_not_void): Likewise.
* include/bits/ranges_algobase.h (__copy_or_move_backward)
(__copy_or_move): Likewise.
* include/bits/ranges_base.h (borrowed_iterator_t): Likewise.
* include/bits/ranges_util.h (borrowed_subrange_t): Likewise.
* include/bits/regex_compiler.h (_BracketMatcher): Use
__conditional_t. Replace typedefs with using-declarations.
* include/bits/shared_ptr_base.h (__shared_count): Use
__conditional_t.
* include/bits/stl_algobase.h (__copy_move, __copy_move_backward):
Likewise.
* include/bits/stl_iterator.h (__detail::__clamp_iter_cat)
(reverse_iterator::iterator_concept)
(__make_move_if_noexcept_iterator)
(iterator_traits<common_iterator<_It, _Sent>>)
(iterator_traits<counted_iterator<_It>>): Likewise.
* include/bits/stl_pair.h (_PCC, pair::operator=): Likewise.
* include/bits/stl_tree.h (_Rb_tree::insert_return_type)
(_Rb_tree::_M_clone_node): Likewise.
* include/bits/unique_ptr.h (unique_ptr(unique_ptr<U,E>&&)):
Likewise.
* include/bits/uses_allocator.h (__uses_alloc): Likewise.
(__is_uses_allocator_predicate): Likewise.
* include/debug/functions.h (__foreign_iterator_aux2): Likewise.
* include/experimental/any (any::_Manager, __any_caster):
Likewise.
* include/experimental/executor (async_completion): Likewise.
* include/experimental/functional (__boyer_moore_base_t):
Likewise.
* include/std/any (any::_Manager): Likewise.
* include/std/functional (__boyer_moore_base_t): Likewise.
* include/std/ranges (borrowed_iterator_t)
(borrowed_subrange_t, __detail::__maybe_present_t)
(__detail::__maybe_const_t, split_view): Likewise.
* include/std/tuple (__empty_not_final, tuple::operator=):
Likewise.
* include/std/variant (__detail::__variant::__get_t): Likewise.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/78113
* include/std/variant (__do_visit): Use a switch when we have a
single variant with a small number of alternatives.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90943
* include/std/variant (__cpp_lib_variant): Update value.
(__detail::__variant::__as): New helpers implementing the
as-variant exposition-only function templates.
(visit, visit<R>): Use __as to upcast the variant parameters.
* include/std/version (__cpp_lib_variant): Update value.
* testsuite/20_util/variant/visit_inherited.cc: New test.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (__normal_iterator): Simplify
converting constructor and do not require _Container::pointer.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/cow_string.h [_GLIBCXX_FULLY_DYNAMIC_STRING]
(basic_string(basic_string&&)): Add noexcept and avoid
allocation, by sharing rep with the rvalue string.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (common_iterator::__arrow_proxy)
(common_iterator::__postfix_proxy): Add noexcept.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/94418
* include/bits/stl_iterator.h (reverse_iterator): Use
conditional noexcept on constructors and assignment operators.
* testsuite/24_iterators/reverse_iterator/noexcept.cc: New test.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100153
* include/bits/vector.tcc (vector<bool>::_M_shrink_to_fit()):
When size() is zero just deallocate and reset.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/96733
* include/bits/stl_algo.h (clamp): Use std::min and std::max.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (basic_regex::multiline): Define for
non-strict C++11 and C++14 modes.
* include/bits/regex_constants.h (regex_constants::multiline):
Add _GLIBCXX_RESOLVE_LIB_DEFECTS comment.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* testsuite/25_algorithms/is_permutation/2.cc: Include <iterator>.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stream_iterator.h (istream_iterator): Add
noexcept to constructors and non-throwing member functions and
friend functions.
(ostream_iterator): Likewise.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/boost_concept_check.h (_Is_vector_bool_iterator):
New trait to identify vector<bool> iterators, including debug
ones.
(_ForwardIteratorReferenceConcept): Add default template
argument using _Is_vector_bool_iterator and use it in partial
specialization for the vector<bool> cases.
(_Mutable_ForwardIteratorReferenceConcept): Likewise.
* testsuite/24_iterators/operations/prev_neg.cc: Adjust dg-error
line number.
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/list.tcc (list::merge): Remove call to size() and
try-catch block. Use _Finalize_merge instead.
* include/bits/stl_list.h (list::_Finalize_merge): New
scope guard type to update _M_size members after a merge.
2021-09-30 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (basic_regex::multiline): Fix #if
condition.
2021-09-29 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (basic_regex::multiline): Define constant
for C++17.
* include/bits/regex_constants.h (regex_constants::multiline):
Define constant for C++17.
(regex_constants::__multiline): Define duplicate constant for
internal use in C++11 and C++14.
* include/bits/regex_executor.h (_Executor::_M_match_multiline()):
New member function.
(_Executor::_M_is_line_terminator(_CharT)): New member function.
(_Executor::_M_at_begin(), _Executor::_M_at_end()): Use new
member functions to support multiline matches.
* testsuite/28_regex/algorithms/regex_match/multiline.cc: New test.
2021-09-29 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex_compiler.h (_Compiler::_S_validate): New
function.
* include/bits/regex_compiler.tcc (_Compiler::_Compiler): Use
_S_validate to check flags.
* include/bits/regex_error.h (_S_grammar): New error code for
internal use.
* testsuite/28_regex/basic_regex/ctors/grammar.cc: New test.
2021-09-29 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/84110
* include/bits/regex_error.h (regex_constants::_S_null): New
error code for internal use.
* include/bits/regex_scanner.tcc (_Scanner::_M_scan_normal()):
Check for null character.
* testsuite/28_regex/basic_regex/84110.cc: New test.
2021-09-29 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (__detail::__is_contiguous_iter): Move
here from <bits/regex_compiler.h>.
(basic_regex::_M_compile): New function to compile an NFA from
a regular expression string.
(basic_regex::basic_regex): Use _M_compile instead of delegating
to other constructors.
(basic_regex::operator=(const basic_regex&)): Define as
defaulted.
(basic_regex::operator=(initializer_list<C>)): Use _M_compile.
(basic_regex::assign(const basic_regex&)): Use copy assignment.
(basic_regex::assign(basic_regex&&)): Use move assignment.
(basic_regex::assign(const C*, flag_type)): Use _M_compile
instead of constructing a temporary string.
(basic_regex::assign(const C*, size_t, flag_type)): Likewise.
(basic_regex::assign(const basic_string<C,T,A>&, flag_type)):
Use _M_compile instead of constructing a temporary basic_regex.
(basic_regex::assign(InputIter, InputIter, flag_type)): Avoid
constructing a temporary string for contiguous iterators of the
right value type.
* include/bits/regex_compiler.h (__is_contiguous_iter): Move to
<bits/regex.h>.
(__enable_if_contiguous_iter, __disable_if_contiguous_iter)
(__compile_nfa): Remove.
* testsuite/28_regex/basic_regex/assign/exception_safety.cc: New
test.
* testsuite/28_regex/basic_regex/ctors/char/other.cc: New test.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/atomic_timed_wait.h (__platform_wait_until_impl):
Return false for ETIMEDOUT and true otherwise.
2021-09-28 François Dumont <fdumont@gcc.gnu.org>
* testsuite/20_util/default_delete/48631_neg.cc: Adapt dg-prune-output message
to also match message with '__8' in it.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex_automaton.h (_NFA_base::_SizeT): Remove.
* include/bits/regex_compiler.h (_Compiler::_IterT): Remove.
* include/bits/regex_compiler.tcc: Likewise.
* include/bits/regex_scanner.h (_Scanner::_IterT): Remove.
* include/bits/regex_scanner.tcc: Likewise.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex_compiler.tcc: Add line break in empty while
statement.
* include/bits/regex_executor.tcc: Avoid unused parameter
warning.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (basic_regex, swap): Add noexcept to
non-throwing functions.
* include/bits/regex_automaton.h (_State_base, _State)
(_NFA_base): Likewise.
* include/bits/regex_compiler.h (_Compiler): Likewise.
* include/bits/regex_error.h (regex_error::code()): Likewise.
* include/bits/regex_scanner.h (_Scanner): Likewise.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/atomic_wait.h (_GLIBCXX_HAVE_PLATFORM_WAIT):
Define before first attempt to check it.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1.cc:
Do not check non-default constructible sequences when
_GLIBCXX_CONCEPT_CHECKS is defined.
* testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1_c++98.cc:
Likewise.
* testsuite/23_containers/queue/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/23_containers/queue/requirements/explicit_instantiation/1_c++98.cc:
Likewise.
* testsuite/23_containers/stack/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/23_containers/stack/requirements/explicit_instantiation/1_c++98.cc:
Likewise.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/deque/requirements/explicit_instantiation/3.cc:
Do not test implicit allocator rebinding when _GLIBCXX_CONCEPT_CHECKS
is defined.
* testsuite/23_containers/forward_list/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/list/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/list/requirements/explicit_instantiation/5.cc:
Likewise.
* testsuite/23_containers/map/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/map/requirements/explicit_instantiation/5.cc:
Likewise.
* testsuite/23_containers/multimap/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc:
Likewise.
* testsuite/23_containers/multiset/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc:
Likewise.
* testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
Likewise.
* testsuite/23_containers/unordered_map/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/unordered_set/requirements/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/vector/ext_pointer/explicit_instantiation/3.cc:
Likewise.
* testsuite/23_containers/vector/requirements/explicit_instantiation/3.cc:
Likewise.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/boost_concept_check.h (_ForwardIteratorConcept)
(_BidirectionalIteratorConcept, _RandomAccessIteratorConcept):
Check result types of iterator operations.
(_Mutable_ForwardIteratorConcept): Check that iterator's
reference type is a reference to its value type.
(_Mutable_BidirectionalIteratorConcept): Do not require the
value type to be assignable.
(_Mutable_RandomAccessIteratorConcept): Likewise.
* testsuite/24_iterators/operations/prev_neg.cc: Adjust dg-error
line number.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* testsuite/25_algorithms/copy/34595.cc: Add missing operation
for type used as an iterator.
* testsuite/25_algorithms/unique_copy/check_type.cc: Likewise.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/is_nothrow_swappable/value.h: Use custom
comparison function for priority_queue of type with no
relational operators.
* testsuite/20_util/is_swappable/value.h: Likewise.
* testsuite/24_iterators/output/concept.cc: Add operator< to
type used in set.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/boost_concept_check.h (_OutputIteratorConcept):
Use a function to preserve value category of the type.
* include/bits/stl_algobase.h (copy, move, fill_n): Use a
reference as the second argument for _OutputIteratorConcept.
(copy_backward, move_backward): Use _OutputIteratorConcept
instead of _ConvertibleConcept.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (pointer_traits): Define partial
specialization for __normal_iterator.
* testsuite/24_iterators/normal_iterator/to_address.cc: New test.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/move.h (forward(remove_reference_t<T>&&)):
Improve text of static_assert.
* testsuite/20_util/forward/c_neg.cc: Adjust dg-error.
* testsuite/20_util/forward/f_neg.cc: Likewise.
2021-09-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102499
* include/bits/fs_path.h (path::begin, path::end): Add noexcept
to declarations, to match definitions.
2021-09-24 Jonathan Wakely <jwakely@redhat.com>
* include/bits/range_access.h (cbegin, cend): Remove redundant
'inline' specifier.
2021-09-23 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
Remove dg-error lines for C++20-only errors.
2021-09-23 Jonathan Wakely <jwakely@redhat.com>
* testsuite/19_diagnostics/headers/system_error/93151.cc:
Disable PCH.
2021-09-23 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/system_error.cc (system_error_category) [_WIN32]:
Map Windows error codes to generic POSIX error numbers. Use
FormatMessage instead of strerror.
* testsuite/19_diagnostics/error_category/system_category.cc:
Adjust for new behaviour on Windows.
2021-09-23 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/system_error.cc (generic_error_category): Define
class and virtual functions as 'final'.
(generic_error_category::equivalent(int, const error_condition&)):
Override.
(system_error_category): Define class and virtual functions as
'final'.
(system_error_category::equivalent(int, const error_condition&)):
Override.
(generic_category_instance, system_category_instance): Use
constinit union to make the objects immortal.
2021-09-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102425
* src/c++11/system_error.cc
(system_error_category::default_error_condition): Add 0 to
switch.
* testsuite/19_diagnostics/error_category/102425.cc: New test.
2021-09-17 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (path::iterator): Add noexcept to all
member functions and friend functions.
(distance): Add noexcept.
(advance): Add noexcept and inline.
* include/experimental/bits/fs_path.h (path::iterator):
Add noexcept to all member functions.
2021-09-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102270
* include/std/tuple (_Tuple_impl): Add constexpr to constructor
missed in previous patch.
* testsuite/20_util/tuple/cons/102270.C: Moved to...
* testsuite/20_util/tuple/cons/102270.cc: ...here.
* testsuite/util/testsuite_allocator.h (SimpleAllocator): Add
constexpr to constructor so it can be used for C++20 tests.
2021-09-17 Jonathan Wakely <jwakely@redhat.com>
* testsuite/26_numerics/valarray/dr630-3.C: Moved to...
* testsuite/26_numerics/valarray/dr630-3.cc: ...here.
* testsuite/27_io/basic_iostream/cons/16251.C: Moved to...
* testsuite/27_io/basic_iostream/cons/16251.cc: ...here.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* src/Makefile.am (stamp-debug): Add all Makefiles as
prerequisites.
* src/Makefile.in: Regenerate.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* testsuite/ext/pb_ds/regression/tree_map_rand.cc: Increase
timeout factor to 3.
* testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/using.xml: Generalize to apply to more than
just -std=c++11.
* doc/html/manual/using_macros.html: Regenerate.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/std/optional (nullptr_t): Make constructor noexcept.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (advance): Remove non-deducible
template parameter.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102270
* include/std/tuple (_Head_base, _Tuple_impl): Add
_GLIBCXX20_CONSTEXPR to allocator-extended constructors.
(tuple<>::swap(tuple&)): Add _GLIBCXX20_CONSTEXPR.
* testsuite/20_util/tuple/cons/102270.C: New test.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102280
* include/std/span (span(Range&&)): Add constraint to deduction
guide.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* src/c++98/Makefile.am: Use CXXCOMPILE not LTCXXCOMPILE.
* src/c++98/Makefile.in: Regenerate.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(to_string): Add noexcept if the type width is 32 bits or less.
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/unique_ptr.h (__uniq_ptr_impl::_M_ptr)
(__uniq_ptr_impl::_M_deleter): Add noexcept.
2021-09-16 Thomas Rodgers <rodgert@twrodgers.com>
PR libstdc++/101761
* testsuite/29_atomics/atomic_ref/wait_notify.cc (test): Use
va and vb as arguments to wait/notify, remove unused bb local.
2021-09-15 Hugo Beauzée-Luyssen <hugo@beauzee.fr>
* crossconfig.m4: Check for TLS support on mingw.
* configure: Regenerate.
2021-09-13 Jason Merrill <jason@redhat.com>
* include/std/version: Define __cpp_lib_hardware_interference_size.
* libsupc++/new: Define hardware interference size variables.
2021-09-10 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
Fix invalid hostname to only match the .invalid TLD.
2021-09-02 Jonathan Wakely <jwakely@redhat.com>
* include/bits/atomic_base.h (__atomic_base<P*>::compare_exchange_weak):
Add new functions.
* include/std/atomic (atomic<T*>::compare_exchange_weak): Use
it.
2021-09-02 Jonathan Wakely <jwakely@redhat.com>
* include/std/atomic: Tweak whitespace.
2021-09-02 Jonathan Wakely <jwakely@redhat.com>
PR c++/102177
* include/bits/atomic_base.h (__is_valid_cmpexch_failure_order):
New function to check if a memory order is valid for the failure
case of compare exchange operations.
(__atomic_base<I>::compare_exchange_weak): Simplify assertions
by using __is_valid_cmpexch_failure_order.
(__atomic_base<I>::compare_exchange_strong): Likewise.
(__atomic_base<P*>::compare_exchange_weak): Likewise.
(__atomic_base<P*>::compare_exchange_strong): Likewise.
(__atomic_impl::compare_exchange_weak): Add assertion.
(__atomic_impl::compare_exchange_strong): Likewise.
* include/std/atomic (atomic::compare_exchange_weak): Likewise.
(atomic::compare_exchange_strong): Likewise.
2021-09-02 Jonathan Wakely <jwakely@redhat.com>
* include/std/functional (invoke_r): Define.
* include/std/version (__cpp_lib_invoke_r): Define.
* testsuite/20_util/function_objects/invoke/version.cc: Check
for __cpp_lib_invoke_r as well as __cpp_lib_invoke.
* testsuite/20_util/function_objects/invoke/4.cc: New test.
2021-08-31 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/98421
* include/std/span (span(Iter, size_type), span(Iter, Iter)):
Add valid range checks.
* testsuite/23_containers/span/cons_1_assert_neg.cc: New test.
* testsuite/23_containers/span/cons_2_assert_neg.cc: New test.
2021-08-31 Jonathan Wakely <jwakely@redhat.com>
* configure.ac: Fix checks for F_GETFL, F_SETFL and O_NONBLOCK.
* configure: Regenerate.
2021-08-31 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/system_error.cc (error_category::~error_category()):
Remove noexcept-specifier.
(system_error::~system_error()): Likewise.
* testsuite/19_diagnostics/error_category/noexcept.cc: New test.
* testsuite/19_diagnostics/system_error/noexcept.cc: New test.
2021-08-31 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102074
* include/bits/atomic_timed_wait.h (__timed_waiter_pool)
[!_GLIBCXX_HAVE_PLATFORM_TIMED_WAIT]: Add missing return.
2021-08-31 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/internet (__make_resolver_error_code):
Handle EAI_SYSTEM errors.
(basic_resolver_results): Use __make_resolver_error_code. Use
Glibc NI_MAXHOST and NI_MAXSERV values for buffer sizes.
2021-08-31 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
Try other service if "http" fails.
2021-08-31 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/names.cc: Undefine some more names used
by Solaris system headers.
2021-08-30 Jason Merrill <jason@redhat.com>
PR c++/96286
* testsuite/30_threads/promise/requirements/lwg3466.cc:
Remove dg-prune-outputs.
2021-08-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/alloc_traits.h (allocator_traits): Add explicit
specialization for allocator<void>. Improve doxygen comments.
* include/bits/allocator.h (allocator<void>): Restore for the
versioned namespace.
(allocator<void>::construct, allocator<void>::destroy): Remove.
* include/ext/extptr_allocator.h (_Extptr_allocator<void>):
Add default constructor and converting constructor.
2021-08-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_uninitialized.h: Fix typo in comment.
2021-08-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/99876
* src/c++17/fs_ops.cc (fs::absolute): Call non-throwing form,
to avoid unnecessary current_path() call.
2021-08-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_function.h (function::function(F&&)): Give
name to defaulted template parameter, to improve diagnostics.
Use markdown for more doxygen comments.
2021-08-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_function.h (function): Adjust doxygen
comments.
* include/bits/unique_ptr.h (make_unique_for_overwrite):
Change parameter name to match doxygen comment.
2021-08-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_function.h (_function_base::_Base_manager):
Replace _M_init_functor with a function template using a
forwarding reference, and a pair of _M_create function
templates. Reuse _M_create for the clone operation.
(function::_Decay_t): New alias template.
(function::_Callable): Simplify by using _Decay.
(function::function(F)): Change parameter to forwarding
reference, as per LWG 2447. Add noexcept-specifier. Simplify
constraints.
(function::operator=(F&&)): Add noexcept-specifier.
* testsuite/20_util/function/cons/lwg2774.cc: New test.
* testsuite/20_util/function/cons/noexcept.cc: New test.
2021-08-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_function.h (function::function(F)): Add
static assertions to check constructibility requirements.
2021-08-26 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100285
* configure.ac: Check for O_NONBLOCK.
* configure: Regenerate.
* include/experimental/internet: Include <ws2tcpip.h> for
Windows. Use preprocessor conditions around more constants.
* include/experimental/socket: Use preprocessor conditions
around more constants.
* testsuite/experimental/net/internet/resolver/base.cc: Only use
constants when the corresponding C macro is defined.
* testsuite/experimental/net/socket/basic_socket.cc: Likewise.
* testsuite/experimental/net/socket/socket_base.cc: Likewise.
Make preprocessor checks more fine-grained.
2021-08-25 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/names.cc: Check 'sz'.
2021-08-25 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/names.cc: Adjust for Windows.
2021-08-25 Jonathan Wakely <jwakely@redhat.com>
* include/std/valarray: Uglify 'func' parameters.
* testsuite/17_intro/names.cc: Add 'func' to checks.
2021-08-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102064
* include/bits/stl_uninitialized.h (_GLIBCXX_USE_ASSIGN_FOR_INIT):
Define macro to check conditions for optimizing trivial cases.
(__check_constructible): New function to do static assert.
(uninitialized_copy, uninitialized_fill, uninitialized_fill_n):
Use new macro.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
Adjust dg-error pattern.
* testsuite/23_containers/vector/cons/89164.cc: Likewise. Add
C++17-specific checks from 89164_c++17.cc.
* testsuite/23_containers/vector/cons/89164_c++17.cc: Removed.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/102064.cc:
New test.
* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/102064.cc:
New test.
* testsuite/20_util/specialized_algorithms/uninitialized_fill/102064.cc:
New test.
* testsuite/20_util/specialized_algorithms/uninitialized_fill_n/102064.cc:
New test.
2021-08-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102048
* include/ext/rope (rope::erase(size_type)): Remove broken
function.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2020.xml: Update table.
* doc/html/manual/status.html: Regenerate.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (is_layout_compatible): Define.
(is_corresponding_member): Define.
* include/std/version (__cpp_lib_is_layout_compatible): Define.
* testsuite/20_util/is_layout_compatible/is_corresponding_member.cc:
New test.
* testsuite/20_util/is_layout_compatible/value.cc: New test.
* testsuite/20_util/is_layout_compatible/version.cc: New test.
* testsuite/20_util/is_pointer_interconvertible/with_class.cc:
New test.
* testsuite/23_containers/span/layout_compat.cc: Do not use real
std::is_layout_compatible trait if available.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/cxx11-shim_facets.cc: Fix mismatched class-key in
explicit instantiation definitions.
2021-08-23 Jonathan Wakely <jwakely@redhat.com>
* include/std/ranges (basic_istream_view): Add default template
argument.
* testsuite/std/ranges/istream_view.cc: Check it.
2021-08-23 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/dyncast.cc (__dynamic_cast): Add __builtin_expect to
precondition check.
2021-08-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90787
* testsuite/util/testsuite_fs.h (permissions_are_testable):
Define as inline.
2021-08-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90787
* testsuite/27_io/filesystem/iterators/directory_iterator.cc:
Use new __gnu_test::permissions_are_testable() function.
* testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
Likewise.
* testsuite/27_io/filesystem/operations/exists.cc: Likewise.
* testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
* testsuite/27_io/filesystem/operations/remove.cc: Likewise.
* testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
* testsuite/27_io/filesystem/operations/status.cc: Likewise.
* testsuite/27_io/filesystem/operations/symlink_status.cc:
Likewise.
* testsuite/27_io/filesystem/operations/temp_directory_path.cc:
Likewise.
* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
Likewise.
* testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
Likewise.
* testsuite/experimental/filesystem/operations/exists.cc:
Likewise.
* testsuite/experimental/filesystem/operations/is_empty.cc:
Likewise.
* testsuite/experimental/filesystem/operations/remove.cc:
Likewise.
* testsuite/experimental/filesystem/operations/remove_all.cc:
Likewise.
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Likewise.
* testsuite/util/testsuite_fs.h (__gnu_test::permissions_are_testable):
New function to guess whether testing permissions will work.
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2020.xml: Move row earlier in table.
* doc/html/manual/status.html: Regenerate.
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in: Update to Doxygen 1.9.2
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101965
* include/std/charconv (__to_chars_i): Remove redundant check.
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101960
* include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Use base
class' move constructor. Define as defaulted for versioned
namespace.
* testsuite/20_util/tuple/cons/101960.cc: New test.
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100139
* doc/xml/manual/status_cxx2020.xml: Add P1739R4 to status table.
* doc/html/manual/status.html: Regenerate.
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr.h: Add @since and @headerfile tags.
* include/bits/unique_ptr.h: Add @headerfile tags.
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
* src/filesystem/ops-common.h (filesystem::file_time): Improve
overflow check by using system_clock::duration::max().
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_tree.h: Tweak whitespace.
2021-08-18 Jonathan Wakely <jwakely@redhat.com>
* include/bits/unique_ptr.h (default_delete): Add @since tag.
(unique_ptr, unique_ptr<T[]>): Likewise. Improve @brief.
(make_unique, make_unique_for_overwrite): Likewise. Add @tparam,
@param, and @returns.
(_MakeUniq): Move to __detail namespace. Add alias template
helpers.
2021-08-18 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_function.h: Improve doxygen comments.
2021-08-18 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (PREDEFINED): Enable doxygen
processing for C++20 components and components that depend on
compiler features.
* include/bits/stl_algo.h (random_shuffle): Use @deprecated.
* include/std/type_traits: Improve doxygen comments for C++20
traits.
2021-08-18 Jonathan Wakely <jwakely@redhat.com>
* include/ext/type_traits.h (__promote_2, __promote_3)
(__promote_4): Redfine as alias templates using __promoted_t.
* include/std/complex (__promote_2): Remove partial
specializations for std::complex.
2021-08-18 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_algo.h (min(initializer_list<T>))
(min(initializer_list<T>, Compare)): Call __min_element directly to
avoid redundant debug checks for valid ranges.
(max(initializer_list<T>), max(initializer_list<T>, Compare)):
Likewise, for __max_element.
(minmax(initializer_list<T>), minmax(initializer_list<T>, Compare)):
Likewise, for __minmax_element.
2021-08-18 Jonathan Wakely <jwakely@redhat.com>
* include/debug/deque (deque(size_type, const T&, const A&)):
Prevent class template argument deduction and replace with a
deduction guide.
* include/debug/forward_list (forward_list(size_type, const T&, const A&)):
Likewise.
* include/debug/list (list(size_type, const T&, const A&)):
Likewise.
* include/debug/vector (vector(size_type, const T&, const A&)):
Likewise.
2021-08-18 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdBitReferencePrinter): Use
'std::vector<bool>::reference' as type name, not _Bit_reference.
(build_libstdcxx_dictionary): Register printers for vector<bool>
types in debug mode too.
* testsuite/libstdc++-prettyprinters/simple.cc: Adjust expected
output for invalid _Bit_reference. Use vector<bool>::reference
instead of _Bit_reference.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2021-08-17 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose,
continued.
2021-08-17 Luc Michel <lmichel@kalray.eu>
Marc Poulhies <mpoulhies@kalrayinc.com>
* testsuite/lib/gdb-test.exp (gdb_version_check)
(gdb_version_check_xmethods): Only check the GDB version for
local native targets.
2021-08-17 Antony Polukhin <antoshkka@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
* include/bits/random.tcc (seed_seq::seed_seq): Reserve capacity
if distance is O(1).
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
line number.
2021-08-17 Jonathan Wakely <jwakely@redhat.com>
* testsuite/26_numerics/random/seed_seq/cons/range.cc: Check
construction from input iterators.
2021-08-17 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdErrorCatPrinter): Remove.
2021-08-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101923
* include/bits/std_function.h (function(function&&)): Check for
non-empty parameter before doing any work.
2021-08-17 Jonathan Wakely <jwakely@redhat.com>
* include/bits/cow_string.h (basic_string::contains): Do not
define for -std=gnu++20.
2021-08-17 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_util.h (__not_same_as): Rename to
__different_from.
* include/std/ranges (__not_same_as): Likewise.
2021-08-17 Jonathan Wakely <jwakely@redhat.com>
* include/std/utility (exchange): Add noexcept-specifier.
* testsuite/20_util/exchange/noexcept.cc: New test.
2021-08-17 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Define.
(build_libstdcxx_dictionary): Register printer for
std::error_code and std::error_condition.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
2021-08-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101937
* src/c++11/debug.cc (PrintContext::_M_indent): Replace with a
static data member.
(print_word): Use qualified-id to access it.
2021-08-16 Jonathan Wakely <jwakely@redhat.com>
* python/Makefile.am [GLIBCXX_BUILD_DEBUG] (install-data-local):
Install another copy of the GDB hook.
* python/Makefile.in: Regenerate.
2021-08-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101870
* include/c_global/cmath (hypot): Use __promoted_t.
(lerp): Add new overload accepting any arithmetic types.
* include/ext/type_traits.h (__promoted_t): New alias template.
* testsuite/26_numerics/lerp.cc: Moved to...
* testsuite/26_numerics/lerp/1.cc: ...here.
* testsuite/26_numerics/lerp/constexpr.cc: New test.
* testsuite/26_numerics/lerp/version.cc: New test.
2021-08-12 Jonathan Wakely <jwakely@redhat.com>
* testsuite/26_numerics/lerp.cc: Add header name to #error.
* testsuite/26_numerics/midpoint/integral.cc: Likewise.
* testsuite/26_numerics/midpoint/version.cc: New test.
2021-08-12 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/random (experimental::randint): Add
nodiscard attribute.
2021-08-12 Jonathan Wakely <jwakely@redhat.com>
* src/c++98/locale_init.cc: Require C++11.
* src/c++98/localename.cc: Likewise.
* src/c++98/misc-inst.cc: Require C++98.
2021-08-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101866
* testsuite/experimental/random/randint.cc: Loop and retry if
reseed() produces the same sequence.
2021-08-11 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (__cpp_lib_is_pointer_interconvertible)
(is_pointer_interconvertible_base_of_v)
(is_pointer_interconvertible_base_of): Define for C++20.
* include/std/version (__cpp_lib_is_pointer_interconvertible):
Define.
* testsuite/23_containers/span/layout_compat.cc: Use correct
feature test macro for std::is_layout_compatible_v.
* testsuite/20_util/is_pointer_interconvertible/value.cc: New test.
* testsuite/20_util/is_pointer_interconvertible/version.cc: New test.
2021-08-09 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (basic_regex::transform_primary): Use
_GLIBCXX_STD_C::vector for local variable.
* include/bits/regex.tcc (__regex_algo_impl): Use reference to
_GLIBCXX_STD_C::vector base class of match_results.
* include/bits/regex_automaton.tcc (_StateSeq:_M_clone): Use
_GLIBCXX_STD_C::map and _GLIBCXX_STD_C::deque for local
variables.
* include/bits/regex_compiler.h (_BracketMatcher): Use
_GLIBCXX_STD_C::vector for data members.
* include/bits/regex_executor.h (_Executor): Likewise.
* include/std/regex [_GLIBCXX_DEBUG]: Include <debug/vector>.
2021-08-09 François Dumont <fdumont@gcc.gnu.org>
* include/debug/safe_container.h
(_Safe_container(_Safe_container&&, const _Alloc&, std::true_type)): New.
(_Safe_container(_Safe_container&&, const _Alloc&, std::false_type)): New.
(_Safe_container(_Safe_container&&, const _Alloc&)): Use latters.
2021-08-09 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/unordered_map/cons/default.cc: Add
equality comparison operators to allocator.
* testsuite/23_containers/unordered_set/cons/default.cc:
Likewise.
2021-08-08 François Dumont <fdumont@gcc.gnu.org>
* testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Replace 'failed_assertion'
dg-prune-output reason with 'builtin_unreachable'.
* testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc: Likewise.
* testsuite/25_algorithms/equal/debug/constexpr_neg.cc: Likewise.
* testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: Likewise.
* testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise.
* testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: Likewise.
* testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: Likewise.
* testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise.
* testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: Likewise.
2021-08-08 Hans-Peter Nilsson <hp@bitrange.com>
* testsuite/std/ranges/iota/max_size_type.cc: Set
dg-timeout-factor to 4.
2021-08-06 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare (compare_three_way, strong_order)
(weak_order, partial_order, compare_strong_order_fallback)
(compare_weak_order_fallback, compare_partial_order_fallback):
Move nodiscard attributes to correct location.
2021-08-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101782
* include/bits/ranges_base.h (ranges::begin, ranges::end)
(ranges::rbegin, ranges::rend, ranges::size, ranges::ssize)
(ranges::empty, ranges::data): Move attribute after the
declarator-id instead of at the end of the declarator.
* include/bits/stl_iterator.h (__gnu_cxx::__normal_iterator):
Move attributes back to the start of the function declarator,
but move the requires-clause to the end.
(common_iterator): Move attribute after the declarator-id.
* include/bits/stl_queue.h (queue): Remove ill-formed attributes
from friend declaration that are not definitions.
* include/std/ranges (views::all, views::filter)
(views::transform, views::take, views::take_while,
views::drop) (views::drop_while, views::join,
views::lazy_split) (views::split, views::counted,
views::common, views::reverse) (views::elements): Move
attributes after the declarator-id.
2021-08-05 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare (partial_ordering, weak_ordering)
(strong_ordering, is_eq, is_neq, is_lt, is_lteq, is_gt, is_gteq)
(compare_three_way, strong_order, weak_order, partial_order)
(compare_strong_order_fallback, compare_weak_order_fallback)
(compare_partial_order_fallback, __detail::__synth3way): Add
nodiscard attribute.
* testsuite/18_support/comparisons/categories/zero_neg.cc: Add
-Wno-unused-result to options.
2021-08-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101782
* include/bits/ranges_base.h (ranges::begin, ranges::end)
(ranges::rbegin, ranges::rend, ranges::size, ranges::ssize)
(ranges::empty, ranges::data): Move attribute to the end of
the declarator.
* include/bits/stl_iterator.h (__gnu_cxx::__normal_iterator)
(common_iterator): Likewise for non-member operator functions.
* include/std/ranges (views::all, views::filter)
(views::transform, views::take, views::take_while, views::drop)
(views::drop_while, views::join, views::lazy_split)
(views::split, views::counted, views::common, views::reverse)
(views::elements): Likewise.
* testsuite/std/ranges/access/101782.cc: New test.
2021-08-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/forward_list.h: Add [[nodiscard]] to functions
with no side-effects.
* include/bits/stl_bvector.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/stl_list.h: Likewise.
* include/bits/stl_queue.h: Likewise.
* include/bits/stl_stack.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/debug/deque: Likewise.
* include/debug/forward_list: Likewise.
* include/debug/list: Likewise.
* include/debug/safe_iterator.h: Likewise.
* include/debug/vector: Likewise.
* include/std/array: Likewise.
* testsuite/23_containers/array/creation/3_neg.cc: Use
-Wno-unused-result.
* testsuite/23_containers/array/debug/back1_neg.cc: Cast result
to void.
* testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
* testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
* testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
* testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc:
Likewise.
* testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
Likewise.
* testsuite/23_containers/array/tuple_interface/get_neg.cc:
Adjust dg-error line numbers.
* testsuite/23_containers/deque/cons/clear_allocator.cc: Cast
result to void.
* testsuite/23_containers/deque/debug/invalidation/4.cc:
Likewise.
* testsuite/23_containers/deque/types/1.cc: Use
-Wno-unused-result.
* testsuite/23_containers/list/types/1.cc: Cast result to void.
* testsuite/23_containers/priority_queue/members/7161.cc:
Likewise.
* testsuite/23_containers/queue/members/7157.cc: Likewise.
* testsuite/23_containers/vector/59829.cc: Likewise.
* testsuite/23_containers/vector/ext_pointer/types/1.cc:
Likewise.
* testsuite/23_containers/vector/ext_pointer/types/2.cc:
Likewise.
* testsuite/23_containers/vector/types/1.cc: Use
-Wno-unused-result.
2021-08-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/iterator_concepts.h (iter_move): Add
[[nodiscard]].
* include/bits/range_access.h (begin, end, cbegin, cend)
(rbegin, rend, crbegin, crend, size, data, ssize): Likewise.
* include/bits/ranges_base.h (ranges::begin, ranges::end)
(ranges::cbegin, ranges::cend, ranges::rbegin, ranges::rend)
(ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
(ranges::empty, ranges::data, ranges::cdata): Likewise.
* include/bits/stl_iterator.h (reverse_iterator, __normal_iterator)
(back_insert_iterator, front_insert_iterator, insert_iterator)
(move_iterator, move_sentinel, common_iterator)
(counted_iterator): Likewise.
* include/bits/stl_iterator_base_funcs.h (distance, next, prev):
Likewise.
* include/bits/stream_iterator.h (istream_iterator)
(ostream_iterartor): Likewise.
* include/bits/streambuf_iterator.h (istreambuf_iterator)
(ostreambuf_iterator): Likewise.
* include/std/ranges (views::single, views::iota, views::all)
(views::filter, views::transform, views::take, views::take_while)
(views::drop, views::drop_while, views::join, views::lazy_split)
(views::split, views::counted, views::common, views::reverse)
(views::elements): Likewise.
* testsuite/20_util/rel_ops.cc: Use -Wno-unused-result.
* testsuite/24_iterators/move_iterator/greedy_ops.cc: Likewise.
* testsuite/24_iterators/normal_iterator/greedy_ops.cc:
Likewise.
* testsuite/24_iterators/reverse_iterator/2.cc: Likewise.
* testsuite/24_iterators/reverse_iterator/greedy_ops.cc:
Likewise.
* testsuite/21_strings/basic_string/range_access/char/1.cc:
Cast result to void.
* testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/range_access/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
Likewise.
* testsuite/23_containers/array/range_access.cc: Likewise.
* testsuite/23_containers/deque/range_access.cc: Likewise.
* testsuite/23_containers/forward_list/range_access.cc:
Likewise.
* testsuite/23_containers/list/range_access.cc: Likewise.
* testsuite/23_containers/map/range_access.cc: Likewise.
* testsuite/23_containers/multimap/range_access.cc: Likewise.
* testsuite/23_containers/multiset/range_access.cc: Likewise.
* testsuite/23_containers/set/range_access.cc: Likewise.
* testsuite/23_containers/unordered_map/range_access.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/range_access.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/range_access.cc:
Likewise.
* testsuite/23_containers/unordered_set/range_access.cc:
Likewise.
* testsuite/23_containers/vector/range_access.cc: Likewise.
* testsuite/24_iterators/customization_points/iter_move.cc:
Likewise.
* testsuite/24_iterators/istream_iterator/sentinel.cc:
Likewise.
* testsuite/24_iterators/istreambuf_iterator/sentinel.cc:
Likewise.
* testsuite/24_iterators/move_iterator/dr2061.cc: Likewise.
* testsuite/24_iterators/operations/prev_neg.cc: Likewise.
* testsuite/24_iterators/ostreambuf_iterator/2.cc: Likewise.
* testsuite/24_iterators/range_access/range_access.cc:
Likewise.
* testsuite/24_iterators/range_operations/100768.cc: Likewise.
* testsuite/26_numerics/valarray/range_access2.cc: Likewise.
* testsuite/28_regex/range_access.cc: Likewise.
* testsuite/experimental/string_view/range_access/char/1.cc:
Likewise.
* testsuite/experimental/string_view/range_access/wchar_t/1.cc:
Likewise.
* testsuite/ext/vstring/range_access.cc: Likewise.
* testsuite/std/ranges/adaptors/take.cc: Likewise.
* testsuite/std/ranges/p2259.cc: Likewise.
2021-08-03 Jonathan Wakely <jwakely@redhat.com>
* include/bits/random.tcc (linear_congruential_engine): Do not
define static constexpr members when they are implicitly inline.
* include/std/ratio (ratio, __ratio_multiply, __ratio_divide)
(__ratio_add, __ratio_subtract): Likewise.
* include/std/type_traits (integral_constant): Likewise.
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
line number.
2021-08-03 Jonathan Wakely <jwakely@redhat.com>
* testsuite/util/testsuite_common_types.h: Replace uses of
tr1::unordered_map and tr1::unordered_set with their C++11
equivalents.
* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust
dg-error line number.
* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
Likewise.
* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc:
Likewise.
* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
Likewise.
* testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
Likewise.
* testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
Likewise.
2021-08-03 Jonathan Wakely <jwakely@redhat.com>
* include/std/memory_resource (polymorphic_allocator::delete_object):
Call destructor directly instead of using destroy.
(allocator_traits<polymorphic_allocator<T>>): Define partial
specialization.
2021-08-03 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/function_objects/binders/3113.cc: Remove
trailing whitespace.
* testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc:
Likewise.
* testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
* testsuite/25_algorithms/headers/algorithm/synopsis.cc:
Likewise.
* testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
Likewise.
2021-08-03 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/evolution.xml: Document deprecation.
* doc/html/*: Regenerate.
* include/bits/c++config (_GLIBCXX14_DEPRECATED): Define.
(_GLIBCXX14_DEPRECATED_SUGGEST): Define.
* include/bits/stl_algo.h (random_shuffle): Deprecate for C++14
and later.
* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Adjust
for C++11 and C++14 changes to std::random_shuffle and
std::shuffle.
* testsuite/25_algorithms/random_shuffle/1.cc: Add options to
use deprecated algorithms.
* testsuite/25_algorithms/random_shuffle/59603.cc: Likewise.
* testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise.
* testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
Likewise.
2021-08-03 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/forward_list/operations/3.cc:
Use lambda instead of std::bind2nd.
* testsuite/20_util/function_objects/binders/3113.cc: Add
options for testing deprecated features.
* testsuite/20_util/pair/cons/99957.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc:
Likewise.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/auto_ptr.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/auto_ptr_neg.cc: Likewise.
* testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
Likewise.
* testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
Likewise.
* testsuite/lib/dg-options.exp (dg_add_options_using-deprecated):
New proc.
2021-08-03 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex_executor.h (_State_info): Replace
unique_ptr<bool[]> with array of bool.
* include/bits/regex_executor.tcc: Likewise.
* include/bits/regex_scanner.tcc: Replace std::strchr with
__builtin_strchr.
* include/std/regex: Replace standard headers with smaller
internal ones.
* testsuite/28_regex/traits/char/lookup_classname.cc: Include
<string.h> for strlen.
* testsuite/28_regex/traits/char/lookup_collatename.cc:
Likewise.
2021-08-03 Jonathan Wakely <jwakely@redhat.com>
* include/bits/locale_conv.h (__detail::_Scoped_ptr): Define new
RAII class template.
(wstring_convert, wbuffer_convert): Use __detail::_Scoped_ptr
instead of unique_ptr.
2021-08-02 Patrick Palka <ppalka@redhat.com>
PR libstdc++/101599
* include/bits/ranges_algo.h (__reverse_copy_fn::operator()):
Add missing std::move in return statement.
(__partition_copy_fn::operator()): Rename templtae parameter
_O2 to _Out2. Uglify function parameters out_true and out_false.
* include/bits/ranges_algobase.h (__copy_or_move): Add missing
std::move to recursive call that unwraps a __normal_iterator
output iterator.
* testsuite/25_algorithms/copy/constrained.cc (test06): New test.
* testsuite/25_algorithms/move/constrained.cc (test05): New test.
2021-08-02 Patrick Palka <ppalka@redhat.com>
PR libstdc++/101589
* include/std/ranges (lazy_split_view::_InnerIter::base): Make
the const& overload unconstrained and return a const reference
as per LWG 3533. Make unconditionally noexcept.
(elements_view::base): Revert accidental r12-569 change.
(elements_view::_Iterator::base): Make the const& overload
unconstrained and return a const reference as per LWG 3533.
Make unconditionally noexcept.
2021-08-02 Patrick Palka <ppalka@redhat.com>
PR libstdc++/101483
* include/std/ranges (join_view::_Iterator::_Iterator): Add
missing std::move.
2021-08-02 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101709
* src/filesystem/ops-common.h (get_temp_directory_from_env):
Add error_code parameter.
* src/c++17/fs_ops.cc (fs::temp_directory_path): Pass error_code
argument to get_temp_directory_from_env and check it.
* src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
2021-08-02 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
Add dg-error for c++11_only target.
2021-07-30 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/65018
* configure.ac: Check for secure_getenv.
* config.h.in: Regenerate.
* configure: Regenerate.
* src/filesystem/ops-common.h (get_temp_directory_from_env): New
helper function to obtain path from the environment.
* src/c++17/fs_ops.cc (fs::temp_directory_path): Use new helper.
* src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
* testsuite/27_io/filesystem/operations/temp_directory_path.cc:
Print messages if test cannot be run.
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Likewise. Fix incorrect condition. Use "TMP" to work with
Windows as well as POSIX.
2021-07-29 Hans-Peter Nilsson <hp@bitrange.com>
* src/c++17/memory_resource.cc: Use __exchange instead
of std::exchange.
2021-07-27 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/optional (__throw_bad_optional_access):
Replace GNU attribute with C++11 attribute.
(optional::value, optional::value_or): Use if statements
instead of conditional expressions.
* include/std/optional (__throw_bad_optional_access)
(optional::value, optional::value_or): Likewise.
2021-07-27 Marek Polacek <polacek@redhat.com>
DR 1512
PR c++/99701
* testsuite/20_util/tuple/comparison_operators/overloaded.cc:
Move a line...
* testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
...here. New test.
2021-07-27 Jonathan Wakely <jwakely@redhat.com>
* include/bits/cow_string.h: Consistently use tab for
indentation.
2021-07-27 Jonathan Wakely <jwakely@redhat.com>
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
(basic_string): Move definition of Copy-on-Write string to
new file.
* include/bits/basic_string.tcc: Likewise.
* include/bits/cow_string.h: New file.
2021-07-27 Jonathan Wakely <jwakely@redhat.com>
* include/std/algorithm: Do not include <utility>.
* include/std/functional: Likewise.
* include/std/regex: Include <bits/stl_pair.h> instead of
<utility>.
* include/debug/map.h: Likewise.
* include/debug/multimap.h: Likewise.
* include/debug/multiset.h: Likewise.
* include/debug/set.h: Likewise.
* include/debug/vector: Likewise.
* include/bits/fs_path.h: Likewise.
* include/bits/unique_ptr.h: Do not include <utility>.
* include/experimental/any: Likewise.
* include/experimental/executor: Likewise.
* include/experimental/memory: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/socket: Use __exchange instead
of std::exchange.
* src/filesystem/ops-common.h: Likewise.
* testsuite/20_util/default_delete/48631_neg.cc: Adjust expected
errors to not use a hardcoded line number.
* testsuite/20_util/default_delete/void_neg.cc: Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc:
Include <utility> for std::as_const.
* testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc:
Likewise.
* testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
Adjust dg-error line number.
2021-07-27 Jonathan Wakely <jwakely@redhat.com>
* include/Makefile.am: Add bits/utility.h header.
* include/Makefile.in: Regenerate.
* include/bits/utility.h: New file.
* include/std/utility (tuple_size, tuple_element): Move
to new header.
* include/std/type_traits (__is_tuple_like_impl<tuple<T...>>):
Move to <tuple>.
(_Index_tuple, _Build_index_tuple, integer_sequence): Likewise.
(in_place_t, in_place_index_t, in_place_type_t): Likewise.
* include/bits/ranges_util.h: Include new header instead of
<utility>.
* include/bits/stl_pair.h (tuple_size, tuple_element): Move
partial specializations for std::pair here.
(get): Move overloads for std::pair here.
* include/std/any: Include new header instead of <utility>.
* include/std/array: Likewise.
* include/std/memory_resource: Likewise.
* include/std/optional: Likewise.
* include/std/variant: Likewise.
* include/std/tuple: Likewise.
(__is_tuple_like_impl<tuple<T...>>): Move here.
(get) Declare overloads for std::array.
* include/std/version (__cpp_lib_tuples_by_type): Change type
to long.
* testsuite/20_util/optional/84601.cc: Include <utility>.
* testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc:
Likewise.
* testsuite/23_containers/array/tuple_interface/get_neg.cc:
Adjust dg-error line numbers.
* testsuite/std/ranges/access/cbegin.cc: Include <utility>.
* testsuite/std/ranges/access/cend.cc: Likewise.
* testsuite/std/ranges/access/end.cc: Likewise.
* testsuite/std/ranges/single_view.cc: Likewise.
2021-07-23 Jonathan Wakely <jwakely@redhat.com>
* include/std/future: Include <bits/atomic_base.h> instead of
<atomic>.
2021-07-23 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_relops.h: Update documentation comments.
2021-07-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101583
* include/bits/hashtable.h (_Hashtable): Replace mixin with
_Enable_default_ctor. Construct it explicitly in all
non-forwarding, non-defaulted constructors.
* testsuite/23_containers/unordered_map/cons/default.cc: Check
non-default constructors can be used.
* testsuite/23_containers/unordered_set/cons/default.cc:
Likewise.
2021-07-22 David Edelsohn <dje.gcc@gmail.com>
* config/os/aix/os_defines.h (__LIBC_NO_CPP_MATH_OVERLOADS__): Define.
2021-07-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/94295
* include/ext/new_allocator.h (_GLIBCXX_OPERATOR_NEW)
(_GLIBCXX_OPERATOR_DELETE, _GLIBCXX_SIZED_DEALLOC): Define.
(allocator::allocate, allocator::deallocate): Use new macros.
2021-07-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101571
* include/bits/ranges_uninitialized.h (_DestroyGuard): Change
constructor parameter to reference and use addressof.
* testsuite/util/testsuite_iterators.h: Define deleted operator&
overloads for test iterators.
2021-07-22 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_function.h (_Function_base): Add
default member initializers and define constructor as defaulted.
(function::_M_invoker): Add default member initializer.
2021-07-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100682
* doc/xml/manual/debug_mode.xml: Update documentation about
debug capability of std::array.
* doc/html/*: Regenerate.
* include/debug/array: New file.
2021-07-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101542
* include/ext/rope (sequence_buffer): Add move constructor and
move assignment operator.
* testsuite/ext/rope/101542.cc: New test.
2021-07-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101510
* src/c++17/fs_ops.cc (fs::create_directories): Use status
instead of symlink_status.
* src/filesystem/ops.cc (fs::create_directories): Likewise.
* testsuite/27_io/filesystem/operations/create_directories.cc:
Check symlink to existing directory.
* testsuite/27_io/filesystem/operations/create_directory.cc: Do
not test with symlinks on Windows.
* testsuite/experimental/filesystem/operations/create_directories.cc:
Check symlink to existing directory.
* testsuite/experimental/filesystem/operations/create_directory.cc:
Do not test with symlinks on Windows.
2021-07-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100863
* include/bits/hashtable.h (_Hashtable): Conditionally delete
default constructor by deriving from _Enable_special_members.
* testsuite/23_containers/unordered_map/cons/default.cc: New test.
* testsuite/23_containers/unordered_set/cons/default.cc: New test.
2021-07-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101510
* src/c++17/fs_ops.cc (create_dir): Adjust whitespace.
* testsuite/27_io/filesystem/operations/create_directory.cc:
Test creating directory with name of existing symlink to
directory.
* testsuite/experimental/filesystem/operations/create_directory.cc:
Likewise.
2021-07-16 Jonathan Wakely <jwakely@redhat.com>
* include/std/tuple (get<I>): Add deleted overload for bad
index.
* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust
expected errors.
2021-07-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/max_size_type.h (numeric_limits<__max_size_type>):
Use __int_traits unconditionally.
2021-07-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/random.h (_Shift::__value): Use constexpr.
(_Select_uint_least_t::type): Use using-declaration.
(_Mod): Likewise.
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
line number.
2021-07-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/cpp_type_traits.h (__INT_N): Use __extension__
instead of diagnostic pragmas.
* include/bits/functional_hash.h: Likewise.
* include/bits/iterator_concepts.h (__is_signed_int128)
(__is_unsigned_int128): Likewise.
* include/bits/max_size_type.h (__max_size_type): Likewise.
(numeric_limits<__max_size_type>): Likewise.
* include/bits/std_abs.h (abs): Likewise.
* include/bits/stl_algobase.h (__size_to_integer): Likewise.
* include/bits/uniform_int_dist.h (uniform_int_distribution):
Likewise.
* include/ext/numeric_traits.h (_GLIBCXX_INT_N_TRAITS):
Likewise.
* include/std/type_traits (__is_integral_helper<INT_N>)
(__is_signed_integer, __is_unsigned_integer)
(__make_unsigned<INT_N>, __make_signed<INT_N>): Likewise.
* include/std/limits (__INT_N): Add __extension__ keyword.
* include/bits/random.h (_Select_uint_least_t)
(random_device): Likewise.
2021-07-16 Patrick Palka <ppalka@redhat.com>
PR libstdc++/101231
* include/std/ranges (_CachedPosition::_M_get): For non-forward
ranges, just call __builtin_unreachable.
* testsuite/std/ranges/istream_view.cc (test05): New test.
2021-07-16 Patrick Palka <ppalka@redhat.com>
PR libstdc++/101214
* include/std/ranges (split_view::split_view): Use std::move.
(split_view::_Iterator::_Iterator): Remove redundant
default_initializable constraint.
(split_view::_Sentinel::_Sentinel): Declare.
* testsuite/std/ranges/adaptors/split.cc (test02): New test.
2021-07-16 Marek Polacek <polacek@redhat.com>
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Add
dg-error.
2021-07-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/unique_ptr.h: Adjust doxygen markup.
2021-07-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101307
* include/std/type_traits: Adjust doxygen markup.
2021-07-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/cpp_type_traits.h: Add diagnostic pragmas around
uses of non-standard integer types.
* include/bits/functional_hash.h: Likewise.
* include/bits/iterator_concepts.h: Likewise.
* include/bits/max_size_type.h: Likewise.
* include/bits/std_abs.h: Likewise.
* include/bits/stl_algobase.h: Likewise.
* include/bits/uniform_int_dist.h: Likewise.
* include/ext/numeric_traits.h: Likewise.
* include/std/type_traits: Likewise.
2021-07-15 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101427
* include/std/tuple (tuple_element): Improve static_assert text.
(__get_helper): Add deleted overload.
(get<i>(tuple<T...>&&), get<i>(const tuple<T...>&&)): Use
__get_helper directly.
(__get_helper2): Remove.
(__find_uniq_type_in_pack): New constexpr helper function.
(get<T>): Use __find_uniq_type_in_pack and __get_helper instead
of __get_helper2.
* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust
expected errors.
* testsuite/20_util/tuple/element_access/101427.cc: New test.
2021-07-15 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101429
* include/bits/c++config (__replacement_assert): Add noexcept.
[!_GLIBCXX_VERBOSE] (__glibcxx_assert_impl): Use __builtin_abort
instead of __replacement_assert.
2021-07-14 Jonathan Wakely <jwakely@redhat.com>
* include/std/string_view (basic_string_view(It, End)): Add
noexcept-specifier.
* testsuite/21_strings/basic_string_view/cons/char/range.cc:
Check noexcept-specifier. Also check construction without CTAD.
2021-07-13 Jonathan Wakely <jwakely@redhat.com>
PR c++/101361
* include/std/string_view (ends_with): Use traits_type::compare
directly.
2021-07-13 Jonathan Wakely <jwakely@redhat.com>
* include/std/string_view: Only include <bits/ranges_base.h>
once, and only for C++20 and later.
2021-07-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101411
* include/std/span (as_writable_bytes): Add requires-clause.
* testsuite/23_containers/span/101411.cc: New test.
2021-07-09 Matheus Castanho <msc@linux.ibm.com>
* include/std/mutex (__lock_impl): Check
_GLIBCXX_HAS_GTHREADS before using __gthread_yield.
2021-07-02 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101271
* include/bits/unique_ptr.h (unique_ptr<T[],D>::operator[]):
Remove noexcept-specifier.
(unique_ptr<T[],D>::_S_nothrow_deref): Remove.
* testsuite/20_util/unique_ptr/lwg2762.cc: Remove checks for
operator[].
2021-07-01 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/doxygroups.cc: Fix docs for std::literals.
* doc/doxygen/user.cfg.in: Exclude the Networking TS header.
Add some more predefined macros.
* include/bits/fs_fwd.h: Move @addtogroup commands inside
namespaces. Add better documentation.
* include/bits/fs_path.h: Likewise.
* include/experimental/bits/fs_fwd.h: Likewise.
* include/experimental/bits/fs_path.h: Likewise.
* include/ext/throw_allocator.h: Fix typo and improve docs.
* include/std/chrono: Move @addtogroup commands.
* include/std/system_error: Move @addtogroup commands.
* libsupc++/exception: Improve documentation.
* libsupc++/exception.h: Add @since documentation.
2021-06-30 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101258
* doc/doxygen/user.cfg.in (INPUT): Add <experimental/simd>.
(COLS_IN_ALPHA_INDEX): Remove obsolete tag.
(PREDEFINED): Add/fix some more macros that need to be expanded.
* include/bits/random.h: Stop Doxygen from documenting internal
implementation details.
* include/bits/random.tcc: Likewise.
* include/bits/this_thread_sleep.h: Fix @file name.
* include/experimental/bits/simd.h: Add to Doxygen group. Do not
document internal implementation details.
* include/experimental/bits/simd_detail.h: Do not document
internal implementation details.
* include/experimental/simd: Define Doxygen groups.
* include/experimental/type_traits: Improve documentation for
the header file. Define groups. Use @since commands.
* include/std/scoped_allocator (scoped_allocator_adaptor): Move
declaration before undocumented region.
* include/std/type_traits (true_type, false_type): Use using
declaration instead of typedef.
(is_invocable_v, is_nothrow_invocable_v, is_invocable_r_v)
(is_nothrow_invocable_r_v): Move definitions next to other C++17
variable templates.
Do not document internal implementation details. Move misplaced
group-end command. Define group for variable templates.
* include/std/variant: Do not document internal implementation
details.
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
line number.
2021-06-30 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/simd: Do not define anything pre-C++17.
2021-06-30 Jonathan Wakely <jwakely@redhat.com>
* include/bits/random.tcc [__cpp_inline_variables]: Remove
redundant definitions of static constexpr member variables.
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
line number.
2021-06-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/streambuf.tcc (__copy_streambufs_eof): Remove
explicit instantiation declarations.
* src/c++11/streambuf-inst.cc (__copy_streambufs_eof): Remove
explicit instantiation definitions.
2021-06-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/97088
* testsuite/17_intro/names.cc: Fix #if condition for names used
by newlib headers.
2021-06-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101236
* include/bits/unique_ptr.h (unique_ptr<T[], D>::operator[]):
Fail gracefully if element_type is incomplete.
* testsuite/20_util/unique_ptr/cons/incomplete.cc: Clarify that
the standard doesn't require this test to work for array types.
* testsuite/20_util/unique_ptr/lwg2762.cc: Check that incomplete
types can be used with array specialization.
* testsuite/20_util/unique_ptr/101236.cc: New test.
2021-06-28 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Document LWG 415 change.
* doc/html/manual/bugs.html: Regenerate.
* include/bits/istream.tcc (ws): Create sentry and catch
exceptions.
* testsuite/27_io/basic_istream/ws/char/lwg415.cc: New test.
* testsuite/27_io/basic_istream/ws/wchar_t/lwg415.cc: New test.
2021-06-25 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ostream.tcc (basic_ostream::write): Call sputn
directly instead of using _M_write. Do setstate(__err) all
outside the try-catch block.
* include/std/ostream (basic_ostream::_M_write): Declare
private. Use __ostream_insert. Do not define for the versioned
namespace.
2021-06-25 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Document LWG 581 change.
* doc/html/manual/bugs.html: Regenerate.
* include/bits/basic_ios.tcc: Whitespace.
* include/bits/ostream.tcc (basic_ostream::flush()): Construct
sentry.
* testsuite/27_io/basic_ostream/flush/char/2.cc: Check
additional cases.
* testsuite/27_io/basic_ostream/flush/char/exceptions_badbit_throw.cc:
Likewise.
* testsuite/27_io/basic_ostream/flush/wchar_t/2.cc: Likewise.
* testsuite/27_io/basic_ostream/flush/wchar_t/exceptions_badbit_throw.cc:
Likewise.
2021-06-25 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ostream.tcc (sentry): Only set failbit if badbit
is set, not if eofbit is set.
(tellp, seekp, seekp): Create sentry object. Do not set badbit
on exceptions.
* testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
Adjust expected behaviour.
* testsuite/27_io/basic_ostream/seekp/wchar_t/exceptions_badbit_throw.cc:
Likewise.
* testsuite/27_io/basic_ostream/tellp/char/exceptions_badbit_throw.cc:
Likewise.
* testsuite/27_io/basic_ostream/tellp/wchar_t/exceptions_badbit_throw.cc:
Likewise.
* testsuite/27_io/basic_ostream/seekp/char/n3168.cc: New test.
* testsuite/27_io/basic_ostream/seekp/wchar_t/n3168.cc: New test.
* testsuite/27_io/basic_ostream/tellp/char/n3168.cc: New test.
* testsuite/27_io/basic_ostream/tellp/wchar_t/n3168.cc: New test.
2021-06-25 Jonathan Wakely <jwakely@redhat.com>
* include/std/syncstream (basic_syncbuf::swap()): Remove
noexcept, as per LWG 3498.
2021-06-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/97088
* testsuite/17_intro/names.cc: Undef more names for newlib and
also for arm-none-linux-gnueabi.
* testsuite/experimental/names.cc: Disable PCH.
2021-06-25 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h (__bit_cast): Implement via
__builtin_bit_cast #if available.
(__proposed::simd_bit_cast): Add overloads for simd and
simd_mask, which use __builtin_bit_cast (or __bit_cast #if not
available), which return an object of the requested type with
the same bits as the argument.
* include/experimental/bits/simd_math.h: Use simd_bit_cast
instead of __bit_cast to allow casts to fixed_size_simd.
(copysign): Remove branch that was only required if __bit_cast
cannot be constexpr.
* testsuite/experimental/simd/tests/bits/test_values.h: Switch
from __bit_cast to __proposed::simd_bit_cast since the former
will not cast fixed_size objects anymore.
2021-06-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_math.h
(_GLIBCXX_SIMD_MATH_CALL2_): Rename arg2_ to __arg2.
(_GLIBCXX_SIMD_MATH_CALL3_): Rename arg2_ to __arg2 and arg3_ to
__arg3.
2021-06-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h (__execute_on_index_sequence)
(__execute_on_index_sequence_with_return)
(__call_with_n_evaluations, __call_with_subscripts): Add flatten
attribute.
2021-06-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_x86.h (_S_trunc, _S_floor)
(_S_ceil): Set bit 8 (_MM_FROUND_NO_EXC) on AVX and SSE4.1
roundp[sd] calls.
2021-06-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_x86.h (_S_ldexp): The AVX512F
implementation doesn't require a _VecBltnBtmsk ABI tag, it
requires either a 64-Byte input (in which case AVX512F must be
available) or AVX512VL.
2021-06-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_math.h: Undefine internal
macros after use.
(frexp): Move #if to a more sensible position and reformat
preceding code.
(logb): Call _SimdImpl::_S_logb for fixed_size instead of
duplicating the code here.
(modf): Simplify condition.
2021-06-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_math.h (fabs): Remove
fabs(simd<integral>) overload.
2021-06-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_converter.h
(_SimdConverter::operator()): Pass _SimdTuple by const-ref.
* include/experimental/bits/simd_fixed_size.h
(_GLIBCXX_SIMD_FIXED_OP): Pass binary operator _SimdTuple
arguments by const-ref.
(_S_masked_unary): Pass _SimdTuple by const-ref.
2021-06-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_fixed_size.h
(_AbisInSimdTuple): Removed.
2021-06-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h: Add missing operator~
overload for simd<floating-point> to __float_bitwise_operators.
* include/experimental/bits/simd_builtin.h
(_SimdImplBuiltin::_S_complement): Bitcast to int (and back) to
implement complement for floating-point vectors.
* include/experimental/bits/simd_fixed_size.h
(_SimdImplFixedSize::_S_copysign): New function, forwarding to
copysign implementation of _SimdTuple members.
* include/experimental/bits/simd_math.h (copysign): Call
_SimdImpl::_S_copysign for fixed_size arguments. Simplify
generic copysign implementation using the new ~ operator.
2021-06-24 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/simd/README.md: Fix typos.
2021-06-24 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr_base.h (__shared_ptr_access::operator[]):
Add noexcept.
* include/bits/unique_ptr.h (unique_ptr::operator*): Add
conditional noexcept as per LWG 2762.
* testsuite/20_util/shared_ptr/observers/array.cc: Check that
dereferencing cannot throw.
* testsuite/20_util/shared_ptr/observers/get.cc: Likewise.
* testsuite/20_util/optional/observers/lwg2762.cc: New test.
* testsuite/20_util/unique_ptr/lwg2762.cc: New test.
2021-06-23 Patrick Palka <ppalka@redhat.com>
PR c++/101174
* testsuite/23_containers/multiset/cons/deduction.cc:
Uncomment CTAD example that was rejected by this bug.
* testsuite/23_containers/set/cons/deduction.cc: Likewise.
2021-06-23 Jonathan Wakely <jwakely@redhat.com>
* include/std/chrono (chrono::year::is_leap()): Fix incorrect
logic in comment.
2021-06-23 Matthias Kretz <m.kretz@gsi.de>
* testsuite/experimental/simd/README.md: New file.
2021-06-23 Matthias Kretz <m.kretz@gsi.de>
* testsuite/experimental/simd/driver.sh: Rewrite output
verbosity logic. Add -p/--percentage option. Allow -v/--verbose
to be used twice. Add -x and -o short options. Parse long
options with = instead of separating space generically. Parce
contracted short options. Make unrecognized options an error.
If same-line output is active, trap on EXIT to increment the
progress (only with --percentage), erase the line and print the
current status.
* testsuite/experimental/simd/generate_makefile.sh: Initialize
helper files for progress account keeping. Update help target
for changes to DRIVEROPTS.
2021-06-23 Matthias Kretz <m.kretz@gsi.de>
* testsuite/Makefile.am (check-simd): Remove -fno-tree-vrp flag
and associated warning.
* testsuite/Makefile.in: Regenerate.
2021-06-23 Cassio Neri <cassio.neri@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
Ulrich Drepper <drepper@redhat.com>
* include/std/chrono (chrono::year::is_leap()): Optimize.
2021-06-23 Patrick Palka <ppalka@redhat.com>
PR c++/86439
* testsuite/23_containers/map/cons/deduction.cc: Replace ambiguous
CTAD examples.
* testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
* testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
Mention one of the replaced examples is broken due to PR101174.
* testsuite/23_containers/set/cons/deduction.cc: Likewise.
* testsuite/23_containers/unordered_map/cons/deduction.cc: Replace
ambiguous CTAD examples.
* testsuite/23_containers/unordered_multimap/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2021-06-23 Jonathan Wakely <jwakely@redhat.com>
* include/std/mutex (__detail::__try_lock_impl): Rename
parameter to avoid clashing with newlib's __lockable macro.
(try_lock): Add 'inline' specifier.
* testsuite/17_intro/names.cc: Add check for __lockable.
* testsuite/30_threads/try_lock/5.cc: Add options for pthreads.
2021-06-22 Jonathan Wakely <jwakely@redhat.com>
Matthias Kretz <m.kretz@gsi.de>
* include/std/mutex (lock): Replace recursion with iteration
when lockables all have the same type.
(__detail::__try_lock_impl): Likewise. Pass lockables as
parameters, instead of a tuple. Always lock the first one, and
recurse for the rest.
(__detail::__lock_impl): Adjust call to __try_lock_impl.
(__detail::__try_to_lock): Remove.
* testsuite/30_threads/lock/3.cc: Check that mutexes are locked.
* testsuite/30_threads/lock/4.cc: Also test non-heterogeneous
arguments.
* testsuite/30_threads/unique_lock/cons/60497.cc: Also check
std::try_lock.
* testsuite/30_threads/try_lock/5.cc: New test.
2021-06-22 Jonathan Wakely <jwakely@redhat.com>
* include/std/memory (declare_reachable, undeclare_reachable)
(declare_no_pointers, undeclare_no_pointers, get_pointer_safety)
(pointer_safety): Only define for C++11 to C++20 inclusive.
* testsuite/20_util/pointer_safety/1.cc: Do not run for C++23.
2021-06-22 Jonathan Wakely <jwakely@redhat.com>
* include/bits/random.h (seed_seq): Constrain initializer-list
constructor.
* include/bits/random.tcc (seed_seq): Add template parameter.
* testsuite/26_numerics/random/seed_seq/cons/default.cc: Check
for noexcept.
* testsuite/26_numerics/random/seed_seq/cons/initlist.cc: Check
constraints.
2021-06-22 Thomas Rodgers <rodgert@appliantology.com>
PR libstdc++/100806
* include/bits/semaphore_base.h (__atomic_semaphore::_M_release):
Force _M_release() to wake all waiting threads.
* testsuite/30_threads/semaphore/100806.cc: New test.
2021-06-21 Jonathan Wakely <jwakely@redhat.com>
* include/std/mutex (__try_to_lock): Move to __detail namespace.
(struct __try_lock_impl): Replace with ...
(__detail::__try_lock_impl<Idx>(tuple<Lockables...>&)): New
function templates to implement std::try_lock.
(try_lock): Use new __try_lock_impl.
(__detail::__lock_impl(int, int&, L0&, L1&...)): New function
template to implement std::lock.
(lock): Use __lock_impl.
2021-06-21 Patrick Palka <ppalka@redhat.com>
* include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
2021-06-20 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (__non_propagating_cache::operator bool):
Define for split_view::begin().
(split_view): Define as per P2210.
(views::__detail::__can_split_view): Define.
(views::_Split, views::split): Define.
* testsuite/std/ranges/adaptors/100577.cc (test01, test02):
Test views::split.
* testsuite/std/ranges/adaptors/split.cc: New test.
* testsuite/std/ranges/p2325.cc (test08a): New test.
* testsuite/std/ranges/p2367.cc (test01): Test views::split.
2021-06-20 Patrick Palka <ppalka@redhat.com>
* include/std/ranges: Rename views::split to views::lazy_split,
split_view to lazy_split_view, etc. throughout.
* testsuite/std/ranges/*: Likewise.
* testsuite/std/ranges/adaptors/lazy_split.cc: New file.
* testsuite/std/ranges/adaptors/lazy_split_neg.cc: New file.
2021-06-20 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (split_view::_OuterIter::__at_end):
Check _M_trailing_empty.
(split_view::_OuterIter::_M_trailing_empty): Define this
data member.
(split_view::_OuterIter::operator++): Set _M_trailing_empty
appropriately.
(split_view::_OuterIter::operator==): Compare
_M_trailing_empty.
* testsuite/std/ranges/adaptors/100479.cc (test03): Expect two
split parts instead of one.
* testsuite/std/ranges/adaptors/split.cc (test11): New test.
2021-06-20 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (split_view::_InnerIter::base): Define as
per P2210.
2021-06-19 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (transform_view::_Iterator::_S_iter_concept):
Consider _Base instead of _Vp as per LWG 3555.
(elements_view::_Iterator::_S_iter_concept): Likewise.
2021-06-19 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (split_view::_OuterIter::value_type::begin):
Remove the non-const overload, and remove the copyable constraint
on the const overload as per LWG 3553.
2021-06-19 Patrick Palka <ppalka@redhat.com>
* include/bits/stl_iterator.h
(__detail::__common_iter_use_postfix_proxy): Add
move_constructible constraint as per LWG 3546.
(common_iterator::__postfix_proxy): Adjust initializer of
_M_keep as per LWG 3546.
2021-06-18 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100387
* include/bits/ranges_algo.h (__minmax_fn::operator()): Rewrite
to limit comparison complexity to 3*N/2.
(__minmax_element_fn::operator()): Likewise.
(shift_right): Avoid premature std::move of __result.
* testsuite/25_algorithms/minmax/constrained.cc (test04, test05):
New tests.
* testsuite/25_algorithms/minmax_element/constrained.cc (test02):
Likewise.
2021-06-18 Patrick Palka <ppalka@redhat.com>
* include/std/concepts (convertible_to): Just use declval as per
LWG 3557.
2021-06-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/95833
* include/std/numeric (reduce(Iter, Iter, T, BinaryOp)): Replace
incorrect static_assert with ones matching the 'Mandates'
conditions in the standard.
* testsuite/26_numerics/reduce/95833.cc: New test.
2021-06-18 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string/cons/char/1.cc: Use
diagnostic pragma to suppress -Wstringop-overread error.
2021-06-18 Patrick Palka <ppalka@redhat.com>
* include/bits/ranges_algo.h (__find_fn, find, __find_if_fn)
(find_if, __find_if_not_fn, find_if_not, _in_in_result)
(__mismatch_fn, mismatch, __search_fn, search): Move to ...
* include/bits/ranges_util.h: ... here.
* include/std/ranges (__detail::find, __detail::find_if)
(__detail::find_if_not, __detail::mismatch): Remove.
(filter_view): Use ranges::find_if instead.
(drop_while_view): Use ranges::find_if_not instead.
(split_view): Use ranges::find and ranges::mismatch instead.
2021-06-18 Patrick Palka <ppalka@redhat.com>
* include/bits/iterator_concepts.h (weakly_incrementable): Remove
default_initializable requirement.
* include/bits/ranges_base.h (ranges::view): Likewise.
* include/bits/ranges_util.h (subrange): Constrain the default
ctor.
* include/bits/stl_iterator.h (back_insert_iterator): Remove the
default ctor.
(front_insert_iterator): Likewise.
(insert_iterator): Likewise. Remove NSDMIs.
(common_iterator): Constrain the default ctor.
(counted_iterator): Likewise.
* include/bits/stream_iterator.h (ostream_iterator): Remove the
default ctor.
* include/std/ranges (__detail::__box::operator=): Handle
self-assignment in the primary template.
(__detail::__box): In the partial specialization: adjust
constraints as per P2325. Add specialized operator= for the
case when the wrapped type is not copyable. Constrain the
default ctor. Avoid list-initialization.
(single_view): Constraint the default ctor.
(iota_view): Relax semiregular constraint to copyable.
Constrain the default ctor.
(iota_view::_Iterator): Constraint the default ctor.
(basic_istream_view): Remove the default ctor. Remove NSDMIs.
Remove redundant checks for empty _M_stream.
(basic_istream_view::_Iterator): Likewise.
(ref_view): Remove the default ctor. Remove NSDMIs.
(ref_view::_Iterator): Constrain the default ctor.
(__detail::__non_propagating_cache::operator=): Define overload
for assigning from a value of the underlying type.
(filter_view): Likewise.
(filter_view::_Iterator): Likewise.
(transform_view): Likewise.
(transform_view::_Iterator): Likewise.
(take_view): Likewise.
(take_view::_Iterator): Likewise.
(take_while_view): Likewise.
(take_while_view::_Iterator): Likewise.
(drop_while_view): Likewise.
(drop_while_view::_Iterator): Likewise.
(join_view): Likewise.
(split_view::_OuterIter::__current): Adjust after changing the
type of _M_current.
(split_view::_M_current): Wrap it in a __non_propagating_cache.
(split_view::split_view): Constrain the default ctor.
(common_view): Constrain the default ctor.
(reverse_view): Likewise.
(elements_view): Likewise.
* include/std/span (enable_view<span<_ElementType, _Extent>>):
Define this partial specialization to true unconditionally.
* include/std/version (__cpp_lib_ranges): Adjust value.
* testsuite/24_iterators/back_insert_iterator/constexpr.cc:
Don't attempt to default construct a back_insert_iterator.
* testsuite/24_iterators/front_insert_iterator/constexpr.cc:
Don't attempt to default construct a front_insert_iterator.
* testsuite/24_iterators/insert_iterator/constexpr.cc:
Don't attempt to default construct an insert_iterator.
* testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
Remove this test for default constructibility of ostream_iterator.
* testsuite/std/ranges/97600.cc: Don't attempt to default
construct a basic_istream_view.
* testsuite/std/ranges/adaptors/detail/semiregular_box.cc:
Rename to ...
* testsuite/std/ranges/adaptors/detail/copyable_box.cc: ... this.
(test02): Adjust now that __box is copyable-box not
semiregular-box.
(test03): New test.
* testsuite/std/ranges/p2325.cc: New test.
* testsuite/std/ranges/single_view.cc (test06): New test.
* testsuite/std/ranges/view.cc: Adjust now that view doesn't
require default_initializable.
2021-06-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91488
* include/bits/basic_string.h (__cpp_lib_constexpr_string): Only
define when is_constant_evaluated is available.
* include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
Likewise.
(__constant_string_p, __constant_array_p): Remove.
(char_traits): Use is_constant_evaluated directly.
* include/std/version (__cpp_lib_constexpr_char_traits)
(__cpp_lib_constexpr_string): Only define when
is_constant_evaluated is available.
2021-06-17 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100940
* include/std/ranges (__adaptor::_Partial): For the "simple"
forwarding partial specializations, also require that
the extra arguments are trivially copyable.
* testsuite/std/ranges/adaptors/100577.cc (test04): New test.
2021-06-17 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100940
* include/std/ranges (__adaptor::_RangeAdaptor): Document the
template form of _S_has_simple_extra_args.
(__adaptor::__adaptor_has_simple_extra_args): Add _Args template
parameter pack. Try to treat _S_has_simple_extra_args as a
variable template parameterized by _Args.
(__adaptor::_Partial): Pass _Arg/_Args to the constraint
__adaptor_has_simple_extra_args.
(views::_Take::_S_has_simple_extra_args): Templatize according
to the type of the extra argument.
(views::_Drop::_S_has_simple_extra_args): Likewise.
(views::_Split::_S_has_simple_extra_args): Define.
* testsuite/std/ranges/adaptors/100577.cc (test01, test02):
Adjust after changes to _S_has_simple_extra_args mechanism.
(test03): Define.
2021-06-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/iterator_concepts.h (__decay_copy): Name type.
2021-06-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h (ranges::begin, ranges::end)
(ranges::cbegin, ranges::cend, ranges::rbeing, ranges::rend)
(ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
(ranges::empty, ranges::data, ranges::cdata): Remove final
keywords and deleted operator& overloads.
* testsuite/24_iterators/customization_points/iter_move.cc: Use
new is_customization_point_object function.
* testsuite/24_iterators/customization_points/iter_swap.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
Likewise.
* testsuite/std/ranges/access/begin.cc: Likewise.
* testsuite/std/ranges/access/cbegin.cc: Likewise.
* testsuite/std/ranges/access/cdata.cc: Likewise.
* testsuite/std/ranges/access/cend.cc: Likewise.
* testsuite/std/ranges/access/crbegin.cc: Likewise.
* testsuite/std/ranges/access/crend.cc: Likewise.
* testsuite/std/ranges/access/data.cc: Likewise.
* testsuite/std/ranges/access/empty.cc: Likewise.
* testsuite/std/ranges/access/end.cc: Likewise.
* testsuite/std/ranges/access/rbegin.cc: Likewise.
* testsuite/std/ranges/access/rend.cc: Likewise.
* testsuite/std/ranges/access/size.cc: Likewise.
* testsuite/std/ranges/access/ssize.cc: Likewise.
* testsuite/util/testsuite_iterators.h
(is_customization_point_object): New function.
2021-06-15 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h (ranges::begin, ranges::end)
(ranges::cbegin, ranges::cend, ranges::rbeing, ranges::rend)
(ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
(ranges::empty, ranges::data, ranges::cdata): Make types final.
Add deleted operator& overloads.
(ranges::advance, ranges::distance, ranges::next, ranges::prev):
Likewise.
* testsuite/std/ranges/headers/ranges/synopsis.cc: Replace
ill-formed & expressions with using-declarations. Add checks for
other function objects.
2021-06-15 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_util.h (view_interface): Add noexcept to
empty, operator bool, data and size members.
(subrange): Add noexcept to constructors.
* include/std/ranges (single_view, ref_view): Add noexcept to
constructors.
(views::single, views::all): Add noexcept.
* testsuite/std/ranges/adaptors/all.cc: Check noexcept.
* testsuite/std/ranges/single_view.cc: Likewise.
2021-06-15 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_util.h (subrange): Add __size_type typedef
and use it to simplify declarations.
(subrange(i, s, n)): Remove assertion.
* testsuite/std/ranges/subrange/constexpr.cc: New test.
2021-06-15 Jonathan Wakely <jwakely@redhat.com>
* include/bits/iterator_concepts.h (__cust_access::__decay_copy):
Replace with function object.
(__cust_access::__member_begin, ___cust_access::_adl_begin): Use
__decay_copy unqualified.
* include/bits/ranges_base.h (__member_end, __adl_end):
Likewise. Use __range_iter_t for type of ranges::begin.
(__member_rend): Use correct value category for rbegin argument.
(__member_data): Use __decay_copy unqualified.
(__begin_data): Use __range_iter_t for type of ranges::begin.
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h (ranges::empty): Check whether
conversion to bool can throw.
* testsuite/std/ranges/access/empty.cc: Check for correct
noexcept-specifier.
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100894
* include/std/type_traits (__common_ref_impl<X&, Y&>): Only
use the type if it's a reference.
* testsuite/20_util/common_reference/100894.cc: New test.
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/filesystem/path/native/conv_c++23.cc:
Add dg-require-filesystem-ts directive.
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101034
* include/std/any (any(in_place_t<T>, initializer_list<U>, A&&...))
(any::emplace<T>(initializer_list<U>, A&&...)): Fix constraint
to use lvalue.
* testsuite/20_util/any/cons/101034.cc: New test.
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
-std=gnu++17 option.
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101056
* libsupc++/compare (compare_partial_order_fallback): Add
constraint using reversed parameter order, as per LWG 3465.
* testsuite/18_support/comparisons/algorithms/fallback.cc:
Adjust expected result.
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare (__decayed_same_as): New helper concept.
(strong_order, weak_order, partial_order): Constrain with new
concept instead of using static_assert.
(compare_strong_order_fallback, compare_weak_order_fallback)
(compare_partial_order_fallback): Likewise. Do not deduce return
types. Remove redundant if-constexpr checks.
* testsuite/18_support/comparisons/algorithms/fallback.cc: New test.
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101055
* include/std/tuple: Use reserved form of attribute name.
* testsuite/17_intro/headers/c++2011/all_attributes.cc: Add
check for no_unique_address.
* testsuite/17_intro/headers/c++2014/all_attributes.cc:
Likewise.
* testsuite/17_intro/headers/c++2017/all_attributes.cc:
Likewise.
2021-06-11 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (operator==, operator<=>): Use new
_S_compare function.
(path::_S_compare): New function to call path::compare in a
context where path::iterator is complete.
* include/experimental/bits/fs_path.h (operator<, operator==):
Define after path::iterator is complete.
* testsuite/27_io/filesystem/path/native/conv_c++23.cc: New
test.
* testsuite/experimental/filesystem/path/native/conv_c++23.cc:
New test.
2021-06-09 Thomas Rodgers <rodgert@appliantology.com>
* testsuite/29_atomics/atomic_ref/wait_notify.cc: Guard
test logic with constexpr check for is_always_lock_free.
2021-06-09 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100982
* include/std/optional (optional::operator=(const optional<U>&)):
Fix value category used in is_assignable check.
* testsuite/20_util/optional/assignment/100982.cc: New test.
2021-06-09 Jonathan Wakely <jwakely@redhat.com>
* include/bits/allocator.h (allocator::is_always_equal): Deprecate.
* include/bits/iterator_concepts.h (indirectly_readable_traits):
Add LWG issue number to comment.
* include/std/memory_resource (polymorphic_allocator::release):
Deprecate.
* testsuite/20_util/allocator/requirements/typedefs.cc: Add
dg-warning for deprecation. Also check std::allocator<void>.
2021-06-08 Thomas Rodgers <rodgert@appliantology.com>
PR libstdc++/100889
* include/bits/atomic_base.h (atomic_ref<_Tp*>::wait):
Change parameter type from _Tp to _Tp*.
* testsuite/29_atomics/atomic_ref/wait_notify.cc: Extend
coverage of types tested.
2021-06-08 Thomas Rodgers <rodgert@appliantology.com>
* include/std/barrier (__tree_barrier::_M_arrive): Remove
unnecessary hasher instantiation.
2021-06-08 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/propagate_const (swap): Constrain.
* testsuite/experimental/propagate_const/swap/lwg3413.cc: New test.
2021-06-07 Avi Kivity <avi@scylladb.com>
PR libstdc++/100900
* include/std/ranges (elements_view::__iter_cat::_S_iter_cat):
Add missing typename.
2021-06-07 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/98842
* include/std/optional (operator<=>(const optional<T>& const U&)):
Add missing constraint and add workaround for template
recursion.
* testsuite/20_util/optional/relops/three_way.cc: Check that
type without equality comparison cannot be compared when wrapped
in std::optional.
2021-06-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100824
* include/bits/ranges_base.h (_SSize): Return signed type.
* testsuite/std/ranges/access/ssize.cc: Check with __int128.
2021-06-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h (_SSize): Return the result of
ranges::size converted to the wider of make-signed-like-t<S> and
ptrdiff_t, rather than the ranges different type.
* testsuite/std/ranges/access/ssize.cc: Adjust expected result
for an iota_view that uses an integer class type for its
difference_type.
2021-06-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100824
* include/bits/ranges_base.h (__member_data): Use __decay_copy.
* testsuite/std/ranges/access/data.cc: Add testcase from PR.
2021-06-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100824
* include/bits/iterator_concepts.h (__detail::__decay_copy)
(__detail::__member_begin, __detail::__adl_begin): Move to
namespace ranges::__cust_access.
(__detail::__ranges_begin): Likewise, and rename to __begin.
Remove redundant static assertion.
* include/bits/ranges_base.h (_Begin, _End, _RBegin, _REnd):
Use lvalue in noexcept specifier.
(__as_const): Add non-deduced parameter for value category.
(_CBegin, _CEnd, _CRBegin, _CREnd, _CData): Adjust uses of
__as_const.
(__member_size, __adl_size, __member_empty, __size0_empty):
(__eq_iter_empty, __adl_data): Use lvalue objects in
requirements.
(__sentinel_size): Likewise. Add check for conversion to
unsigned-like.
(__member_data): Allow non-lvalue types to satisfy the concept,
but use lvalue object in requirements.
(_Size, _SSize): Remove forwarding to always use an lvalue.
(_Data): Likewise. Add static assertion for arrays.
* testsuite/std/ranges/access/cdata.cc: Adjust expected
behaviour for rvalues. Add negative tests for ill-formed
expressions.
* testsuite/std/ranges/access/data.cc: Likewise.
* testsuite/std/ranges/access/empty.cc: Adjust expected
behaviour for rvalues.
* testsuite/std/ranges/access/size.cc: Likewise.
2021-06-04 Tim Adye <Tim.Adye@cern.ch>
* include/std/any (any::_Manager::_S_access): New static
function to access the contained value.
(any::emplace, __any_caster): Use _S_access member of the
manager type.
2021-06-04 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2020.xml:
* doc/html/*: Regenerate.
* include/bits/hashtable.h (__cpp_lib_generic_unordered_lookup):
Define.
* include/std/version (__cpp_lib_generic_unordered_lookup):
Define.
* testsuite/23_containers/unordered_map/operations/1.cc: Check
feature test macro.
* testsuite/23_containers/unordered_set/operations/1.cc:
Likewise.
2021-06-03 Patrick Palka <ppalka@redhat.com>
* include/bits/ranges_algo.h (__detail::__can_reread_output):
Factor out this concept from ...
(__unique_copy_fn::operator()): ... here. Use the concept
throughout.
* testsuite/std/ranges/range.cc: Remove now ill-formed use
of range_value_t on an output_range.
* testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
Define value_type, pointer and reference member types to void.
2021-06-03 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100577
* include/std/ranges (_RangeAdaptorClosure): Document
_S_has_simple_call_op mechanism.
(_RangeAdaptor): Document _S_has_simple_extra_args mechanism.
(__closure_has_simple_call_op): New concept.
(__adaptor_has_simple_extra_args): Likewise.
(_Partial<_Adaptor, _Args...>): New partial specialization.
(_Partial<_Adaptor, _Arg>): Likewise.
(_Pipe<_Lhs, _Rhs>): Likewise.
(views::_All::_S_has_simple_call_op): Define to true.
(views::_Filter::_S_has_simple_extra_args): Likewise.
(views::_Transform::_S_has_simple_extra_args): Likewise.
(views::_Take::_S_has_simple_extra_args): Likewise.
(views::_TakeWhile::_S_has_simple_extra_args): Likewise.
(views::_Drop::_S_has_simple_extra_args): Likewise.
(views::_DropWhile::_S_has_simple_extra_args): Likewise.
(views::_Join::_S_has_simple_call_op): Likewise.
(views::_Split): Document why we don't define
_S_has_simple_extra_args to true for this adaptor.
(views::_Common::_S_has_simple_call_op): Define to true.
(views::_Reverse::_S_has_simple_call_op): Likewise.
(views::_Elements::_S_has_simple_call_op): Likewise.
* testsuite/std/ranges/adaptors/100577.cc: New test.
2021-06-02 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100863
PR libstdc++/65816
* include/bits/hashtable_policy.h (_Hashtable_ebo_helper):
Value-initialize subobject.
* testsuite/23_containers/unordered_map/allocator/default_init.cc:
Remove XFAIL.
* testsuite/23_containers/unordered_set/allocator/default_init.cc:
Remove XFAIL.
2021-06-02 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/96088
* testsuite/23_containers/unordered_map/96088.cc: Adjust
expected number of allocations.
* testsuite/23_containers/unordered_set/96088.cc: Likewise.
2021-06-02 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxxis29124.xml: Improve punctuation.
* doc/xml/manual/status_cxxtr1.xml: Likewise.
* doc/xml/manual/status_cxxtr24733.xml: Likewise.
* doc/html/*: Regenerate.
2021-06-01 Patrick Palka <ppalka@redhat.com>
PR c++/65816
* testsuite/23_containers/deque/allocator/default_init.cc,
testsuite/23_containers/forward_list/allocator/default_init.cc,
testsuite/23_containers/list/allocator/default_init.cc,
testsuite/23_containers/map/allocator/default_init.cc,
testsuite/23_containers/set/allocator/default_init.cc,
testsuite/23_containers/vector/allocator/default_init.cc,
testsuite/23_containers/vector/bool/allocator/default_init.cc:
Remove xfail.
2021-06-01 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/unordered_map/96088.cc: Change
effective target to c++17.
* testsuite/23_containers/unordered_set/96088.cc: Likewise.
2021-06-01 Jonathan Wakely <jwakely@redhat.com>
* testsuite/22_locale/ctype/is/string/89728_neg.cc: Only test
isblank for C++11 and later.
2021-06-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100833
* include/bits/ranges_base.h (ranges::advance(iter, n, sentinel)):
Fix return value for no-op case.
* testsuite/24_iterators/range_operations/advance.cc: Test
return values of three-argument overload.
2021-06-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/99453
* python/Makefile.am: Use archive name for printer hook if no
dynamic library name is available.
* python/Makefile.in: Regenerate.
2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
* doc/xml/manual/abi.xml: Remove dead reference to "Intel
Compilers for Linux: Compatibility with GNU Compilers" article.
* doc/html/manual/abi.html: Regenerate.
2021-05-26 François Dumont <fdumont@gcc.gnu.org>
* include/debug/formatter.h
(_Error_formatter::_Parameter::_Named): New.
(_Error_formatter::_Parameter::_Type): Inherit latter.
(_Error_formatter::_Parameter::_M_integer): Likewise.
(_Error_formatter::_Parameter::_M_string): Likewise.
* src/c++11/debug.cc: Include <cstring>.
(_Print_func_t): New.
(print_raw(PrintContext&, const char*, ptrdiff_t)): New.
(print_word): Use '%.*s' format in fprintf to render only expected number of chars.
(pretty_print(PrintContext&, const char*, _Print_func_t)): New.
(print_type): Rename in...
(print_type_info): ...this. Use pretty_print.
(print_address, print_integer): New.
(print_named_name, print_iterator_constness, print_iterator_state): New.
(print_iterator_seq_type): New.
(print_named_field, print_type_field, print_instance_field, print_iterator_field): New.
(print_field): Use latters.
(print_quoted_named_name, print_type_type, print_type, print_instance): New.
(print_string(PrintContext&, const char*, const _Parameter*, size_t)):
Change signature to...
(print_string(PrintContext&, const char*, ptrdiff_t, const _Parameter*, size_t)):
...this and adapt. Remove intermediate buffer to render input string.
(print_string(PrintContext&, const char*, ptrdiff_t)): New.
2021-05-26 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100768
* include/bits/ranges_base.h (advance, distance, next, prev):
Replace function templates with function objects.
* testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
Adjust for changes to function objects.
* testsuite/std/ranges/adaptors/elements.cc: Add using
declarations for names from namespace ranges.
* testsuite/std/ranges/adaptors/transform.cc: Likewise.
* testsuite/24_iterators/range_operations/100768.cc: New test.
2021-05-24 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/96088
* include/bits/hashtable_policy.h (_Select2nd): New.
(_NodeBuilder<>): New.
(_ReuseOrAllocNode<>::operator()): Use variadic template args.
(_AllocNode<>::operator()): Likewise.
* include/bits/hashtable.h
(_Hashtable<>::__node_builder_t): New.
(_Hashtable<>::_M_insert_unique<>(_Kt&&, _Arg&&, const _NodeGenerator&)):
New.
(_Hashtable<>::_S_forward_key): New.
(_Hashtable<>::_M_insert): Use latter.
(_Hashtable<>::_M_insert(const_iterator, _Arg&&, const _NodeGenerator&, false_type)):
Instantiate node first, compute hash code second.
* testsuite/23_containers/unordered_map/96088.cc: New test.
* testsuite/23_containers/unordered_multimap/96088.cc: New test.
* testsuite/23_containers/unordered_multiset/96088.cc: New test.
* testsuite/23_containers/unordered_set/96088.cc: New test.
* testsuite/util/replacement_memory_operators.h
(counter::_M_increment): New.
(counter::_M_decrement): New.
(counter::reset()): New.
2021-05-24 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100479
* include/std/ranges (__detail::__non_propagating_cache): Move
definition up to before that of _CachedPosition. Make base
class _Optional_base protected instead of private. Add const
overload for operator*.
(__detail::_CachedPosition): Rewrite the partial specialization
for forward ranges as a derived class of __non_propagating_cache.
Remove the size constraint on the partial specialization for
random access ranges. Add copy/move/copy-assignment/move-assignment
members to the offset partial specialization for random
access ranges that propagate the cached value but additionally
invalidate it in the source object on move.
* testsuite/std/ranges/adaptors/100479.cc: New test.
2021-05-24 Jonathan Wakely <jwakely@redhat.com>
* testsuite/25_algorithms/inplace_merge/constrained.cc: Qualify
call to ranges::next.
* testsuite/25_algorithms/is_sorted/constrained.cc: Likewise.
* testsuite/25_algorithms/is_sorted_until/constrained.cc:
Likewise.
* testsuite/25_algorithms/swap_ranges/1.cc: Qualify call to
swap_ranges.
2021-05-21 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100606
* include/std/ranges (drop_while_view::begin): Assert the
precondition added by LWG 3490.
2021-05-21 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100690
* include/std/ranges (iota_view::_Sentinel::_M_distance_from):
Split out this member function from ...
(iota_view::_Sentinel::operator-): ... here, for sake of access
control.
* testsuite/std/ranges/iota/iota_view.cc (test05): New test.
2021-05-20 Jonathan Wakely <jwakely@redhat.com>
* include/bits/random.tcc (__representable_as_double)
(__p1_representable_as_double): Add "" to static asserts.
2021-05-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100676
* include/bits/c++config (__glibcxx_assert_1): Rename to ...
(__glibcxx_constexpr_assert): ... this.
(__glibcxx_assert_impl): Use __glibcxx_constexpr_assert.
(__glibcxx_assert): Define as either __glibcxx_constexpr_assert
or __glibcxx_assert_impl.
(__glibcxx_assert_2): Remove
* include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): Use
__glibcxx_constexpr_assert instead of __glibcxx_assert_1.
* testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
Adjust expected error.
* testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
Likewise.
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
Likewise.
* testsuite/23_containers/span/back_neg.cc: Likewise.
* testsuite/23_containers/span/front_neg.cc: Likewise.
* testsuite/23_containers/span/index_op_neg.cc: Likewise.
2021-05-20 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100639
* include/bits/stl_iterator.h (reverse_iterator::difference_type):
In C++20 mode, define in terms of iter_difference_t as per P0896R4.
(reverse_iterator::reference): Likewise, but with iter_reference_t.
(reverse_iterator::value_type): Likewise, but with iter_value_t.
* testsuite/std/ranges/adaptors/reverse.cc (test08): New test.
* testsuite/24_iterators/reverse_iterator/100639.cc: New test.
2021-05-20 Joern Rennecke <joern.rennecke@riscy-ip.com>
PR libstdc++/100361
* include/std/charconv (to_chars): Hide the overloads for
floating-point types for 16 bit targets.
* src/c++17/floating_to_chars.cc: Don't compile for 16 bit targets.
* testsuite/20_util/to_chars/double.cc: Run this test only on
size32plus targets.
* testsuite/20_util/to_chars/float.cc: Likewise.
* testsuite/20_util/to_chars/long_double.cc: Likewise.
2021-05-18 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100631
* include/std/ranges (elements_view::_Sentinel::operator-): Use
_M_distance_from in the other operator- overload too.
* testsuite/std/ranges/adaptors/elements.cc (test06): Augment test.
2021-05-18 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/lib/prune.exp: Add note about 'dg-note'.
2021-05-18 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100475
* include/std/ranges (__box::__box): Use non-list-initialization
in member initializer list of in-place constructor of the
partial specialization for semiregular types.
(__box::operator->): Use std::__addressof.
* testsuite/std/ranges/adaptors/detail/semiregular_box.cc
(test02): New test.
* testsuite/std/ranges/single_view.cc (test04): New test.
2021-05-18 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100621
* include/std/ranges (reverse_view::_S_needs_cached_begin):
Set to true if the underlying non-common random-access range
doesn't have a sized sentinel.
2021-05-18 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100631
* include/std/ranges (elements_view::_Iterator): Also befriend
_Sentinel<!_Const>.
(elements_view::_Sentinel::_M_equal): Templatize.
(elements_view::_Sentinel::_M_distance_from): Split out from ...
(elements_view::_Sentinel::operator-): ... here. Depend on
_Base2 instead of _Base in the return type.
* testsuite/std/ranges/adaptors/elements.cc (test06, test07):
New tests.
2021-05-17 Thomas Rodgers <rodgert@twrodgers.com>
* include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop
until value change observed.
(__waiter_base::_M_laundered): New member.
(__waiter_base::_M_notify): Check _M_laundered to determine
whether to wake one or all.
(__detail::__atomic_compare): Return true if call to
__builtin_memcmp() == 0.
(__waiter_base::_S_do_spin_v): Adjust predicate.
* testsuite/29_atomics/atomic/wait_notify/100334.cc: New
test.
2021-05-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100630
* include/experimental/bits/fs_path.h (__is_constructible_from):
Test construction from a const lvalue, not an rvalue.
* testsuite/27_io/filesystem/path/construct/100630.cc: New test.
* testsuite/experimental/filesystem/path/construct/100630.cc:
New test.
2021-05-17 Antony Polukhin <antoshkka@gmail.com>
PR libstdc++/89728
* include/bits/locale_facets.h (ctype<basic_string<C,T,A>>):
Declare (but do not define) partial specialization.
* testsuite/22_locale/ctype/is/string/89728_neg.cc: New test.
2021-05-17 Jonathan Wakely <jwakely@redhat.com>
* include/std/thread (jthread::_S_create): Fix static assert
message.
* testsuite/30_threads/jthread/95989.cc: Re-enable test.
* testsuite/30_threads/jthread/jthread.cc: Do not require
pthread effective target.
* testsuite/30_threads/jthread/2.cc: Moved to...
* testsuite/30_threads/jthread/version.cc: ...here.
2021-05-17 Jonathan Wakely <jwakely@redhat.com>
* doc/Makefile.am: Simplify doxygen recipes and use --latex_cmd.
* doc/Makefile.in: Regenerate.
* doc/doxygen/user.cfg.in (LATEX_CMD_NAME): Add placeholder
value.
* scripts/run_doxygen (print_usage): Always print to stdout and
do not exit.
(fail): New function for exiting on error.
(parse_options): Handle --latex_cmd. Do not treat --help the
same as errors. Simplify handling of required arguments.
2021-05-12 Jonathan Wakely <jwakely@redhat.com>
* testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc:
Increase dg-timeout-factor to 4. Fix -Wunused-parameter
warnings. Replace bitwise AND with logical AND in loop
condition.
* testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc:
Replace bitwise AND with logical AND in loop condition.
* testsuite/util/pstl/test_utils.h: Remove unused parameter
names.
2021-05-11 Patrick Palka <ppalka@redhat.com>
* src/c++17/ryu/LOCAL_PATCHES: Update.
* src/c++17/ryu/ryu_generic_128.h: Remove extern "C".
Remove declarations for never-defined functions.
* testsuite/20_util/to_chars/4.cc: New test.
2021-05-11 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/headers/memory/synopsis.cc: Define C++98
alternative for macro.
* testsuite/20_util/shared_ptr/creation/99006.cc: Add effective
target keyword.
* testsuite/25_algorithms/copy/debug/99402.cc: Avoid C++11
syntax.
2021-05-11 Jonathan Wakely <jwakely@redhat.com>
* include/bits/allocator.h (allocator<void>) [C++20]: Add
missing noexcept to constructor. Restore missing POCMA and
is_always_equal_traits.
[C++17]: Make construct and destroy members private and
declare allocator_traits as a friend.
* include/bits/memoryfwd.h (allocator_traits): Declare.
* include/ext/malloc_allocator.h (malloc_allocator::allocate):
Add nodiscard attribute. Add static assertion for LWG 3307.
* include/ext/new_allocator.h (new_allocator::allocate): Add
static assertion for LWG 3307.
* testsuite/20_util/allocator/void.cc: Check that converting
constructor is noexcept. Check for propagation traits and
size_type and difference_type. Check that pointer and
const_pointer are gone in C++20.
2021-05-10 Jonathan Wakely <jwakely@redhat.com>
* include/std/stop_token: Remove TODO comment.
2021-05-10 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)):
Initialize a non-reference deleter from an rvalue, as per LWG
3548.
(__shared_ptr::_UniqCompatible): Add missing constraint.
* testsuite/20_util/shared_ptr/cons/lwg3548.cc: New test.
* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: Check
constraints.
2021-05-10 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/headers/c++2017/all_attributes.cc: Remove
-std=gnu++17 from dg-options directive.
* testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
Likewise.
* testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
Likewise.
* testsuite/17_intro/headers/c++2017/operator_names.cc:
Likewise.
* testsuite/17_intro/headers/c++2017/parallel_mode.cc: Likewise.
* testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
* testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
Likewise.
* testsuite/18_support/aligned_alloc/aligned_alloc.cc: Likewise.
* testsuite/18_support/byte/81076.cc: Likewise.
* testsuite/18_support/byte/global_neg.cc: Likewise.
* testsuite/18_support/byte/ops.cc: Likewise.
* testsuite/18_support/byte/requirements.cc: Likewise.
* testsuite/18_support/headers/cfloat/values_c++17.cc: Likewise.
* testsuite/18_support/launder/1.cc: Likewise.
* testsuite/18_support/launder/nodiscard.cc: Likewise.
* testsuite/18_support/launder/requirements.cc: Likewise.
* testsuite/18_support/launder/requirements_neg.cc: Likewise.
* testsuite/18_support/new_aligned.cc: Likewise.
* testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
Likewise.
* testsuite/19_diagnostics/error_code/is_error_code_v.cc:
Likewise.
* testsuite/19_diagnostics/error_condition/hash.cc: Likewise.
* testsuite/20_util/addressof/requirements/constexpr.cc:
Likewise.
* testsuite/20_util/as_const/1.cc: Likewise.
* testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
* testsuite/20_util/bind/83427.cc: Likewise.
* testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
* testsuite/20_util/bool_constant/requirements.cc: Likewise.
* testsuite/20_util/duration/arithmetic/constexpr_c++17.cc:
Likewise.
* testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
Likewise.
* testsuite/20_util/duration_cast/rounding.cc: Likewise.
* testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
Likewise.
* testsuite/20_util/from_chars/1_neg.cc: Likewise.
* testsuite/20_util/from_chars/requirements.cc: Likewise.
* testsuite/20_util/function/91456.cc: Likewise.
* testsuite/20_util/function/cons/deduction.cc: Likewise.
* testsuite/20_util/function_objects/83607.cc: Likewise.
* testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
* testsuite/20_util/function_objects/mem_fn/80478.cc: Likewise.
* testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
* testsuite/20_util/function_objects/not_fn/87538.cc: Likewise.
* testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/has_unique_object_representations/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/has_unique_object_representations/value.cc:
Likewise.
* testsuite/20_util/hash/nullptr.cc: Likewise.
* testsuite/20_util/in_place/requirements.cc: Likewise.
* testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise.
* testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_aggregate/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_aggregate/value.cc: Likewise.
* testsuite/20_util/is_invocable/83395.cc: Likewise.
* testsuite/20_util/is_invocable/91456.cc: Likewise.
* testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_invocable/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_invocable/value.cc: Likewise.
* testsuite/20_util/is_literal_type/deprecated-1z.cc: Likewise.
* testsuite/20_util/is_nothrow_constructible/94003.cc: Likewise.
* testsuite/20_util/is_nothrow_invocable/83395.cc: Likewise.
* testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc: Likewise.
* testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
* testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
* testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable_with/value.cc:
Likewise.
* testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_swappable/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_swappable/value.cc: Likewise.
* testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_swappable_with/value.cc: Likewise.
* testsuite/20_util/logical_traits/83134.cc: Likewise.
* testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/logical_traits/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/logical_traits/value.cc: Likewise.
* testsuite/20_util/pair/cons/deduction.cc: Likewise.
* testsuite/20_util/pair/swap_cxx17.cc: Likewise.
* testsuite/20_util/ratio/requirements/ratio_equal_v.cc:
Likewise.
* testsuite/20_util/reference_wrapper/83427.cc: Likewise.
* testsuite/20_util/reference_wrapper/deduction.cc: Likewise.
* testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/deduction.cc: Likewise.
* testsuite/20_util/shared_ptr/requirements/weak_type.cc:
Likewise.
* testsuite/20_util/time_point/arithmetic/constexpr.cc:
Likewise.
* testsuite/20_util/time_point_cast/rounding.cc: Likewise.
* testsuite/20_util/to_chars/3.cc: Likewise.
* testsuite/20_util/to_chars/chars_format.cc: Likewise.
* testsuite/20_util/to_chars/lwg3266.cc: Likewise.
* testsuite/20_util/to_chars/requirements.cc: Likewise.
* testsuite/20_util/tuple/78939.cc: Likewise.
* testsuite/20_util/tuple/apply/1.cc: Likewise.
* testsuite/20_util/tuple/apply/2.cc: Likewise.
* testsuite/20_util/tuple/cons/deduction.cc: Likewise.
* testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
* testsuite/20_util/tuple/make_from_tuple/2.cc: Likewise.
* testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
* testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/deduction_neg.cc: Likewise.
* testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
Likewise.
* testsuite/20_util/variable_templates_for_traits.cc: Likewise.
* testsuite/20_util/void_t/1.cc: Likewise.
* testsuite/20_util/weak_ptr/cons/deduction.cc: Likewise.
* testsuite/24_iterators/container_access.cc: Likewise.
* testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
Likewise.
* testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
Likewise.
* testsuite/24_iterators/range_access/range_access_cpp17.cc:
Likewise.
* testsuite/24_iterators/range_access/range_access_cpp17_neg.cc:
Likewise.
* testsuite/26_numerics/gcd/gcd_neg.cc: Likewise.
* testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
Likewise.
* testsuite/26_numerics/headers/cmath/hypot.cc: Likewise.
* testsuite/26_numerics/headers/cmath/special_functions_global.cc:
Likewise.
* testsuite/26_numerics/lcm/1.cc: Likewise.
* testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
* testsuite/26_numerics/valarray/deduction.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
Likewise.
* testsuite/27_io/manipulators/standard/char/quoted_sv.cc:
Likewise.
* testsuite/27_io/manipulators/standard/wchar_t/quoted_sv.cc:
Likewise.
* testsuite/27_io/types/4.cc: Likewise.
* testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
* testsuite/libstdc++-prettyprinters/91997.cc: Likewise.
* testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2021-05-10 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/function_objects/searchers.cc: Remove
-std=gnu++17 from dg-options directive.
* testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94831.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
Likewise.
* testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
Likewise.
* testsuite/25_algorithms/clamp/1.cc: Likewise.
* testsuite/25_algorithms/clamp/2.cc: Likewise.
* testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
* testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/for_each/for_each_n.cc: Likewise.
* testsuite/25_algorithms/for_each/for_each_n_debug.cc:
Likewise.
* testsuite/25_algorithms/sample/1.cc: Likewise.
* testsuite/25_algorithms/sample/2.cc: Likewise.
* testsuite/25_algorithms/sample/3.cc: Likewise.
* testsuite/25_algorithms/sample/81221.cc: Likewise.
* testsuite/25_algorithms/search/searcher.cc: Likewise.
* testsuite/26_numerics/exclusive_scan/1.cc: Likewise.
* testsuite/26_numerics/inclusive_scan/1.cc: Likewise.
* testsuite/26_numerics/reduce/1.cc: Likewise.
* testsuite/26_numerics/reduce/2.cc: Likewise.
* testsuite/26_numerics/transform_exclusive_scan/1.cc: Likewise.
* testsuite/26_numerics/transform_inclusive_scan/1.cc: Likewise.
* testsuite/26_numerics/transform_reduce/1.cc: Likewise.
2021-05-10 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/array/cons/deduction.cc: Remove
-std=gnu++17 from dg-options directive.
* testsuite/23_containers/array/cons/deduction_neg.cc: Likewise.
* testsuite/23_containers/array/element_access/constexpr_c++17.cc:
Likewise.
* testsuite/23_containers/array/requirements/constexpr_iter.cc:
Likewise.
* testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
Likewise.
* testsuite/23_containers/deque/cons/deduction.cc: Likewise.
* testsuite/23_containers/deque/modifiers/emplace/cxx17_return.cc:
Likewise.
* testsuite/23_containers/forward_list/cons/deduction.cc:
Likewise.
* testsuite/23_containers/forward_list/modifiers/emplace_cxx17_return.cc:
Likewise.
* testsuite/23_containers/list/cons/deduction.cc: Likewise.
* testsuite/23_containers/list/modifiers/emplace/cxx17_return.cc:
Likewise.
* testsuite/23_containers/map/cons/deduction.cc: Likewise.
* testsuite/23_containers/map/modifiers/extract.cc: Likewise.
* testsuite/23_containers/map/modifiers/insert/83226.cc:
Likewise.
* testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
Likewise.
* testsuite/23_containers/map/modifiers/merge.cc: Likewise.
* testsuite/23_containers/map/modifiers/try_emplace/1.cc:
Likewise.
* testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
* testsuite/23_containers/multimap/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
* testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
* testsuite/23_containers/multiset/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
* testsuite/23_containers/priority_queue/deduction.cc: Likewise.
* testsuite/23_containers/queue/deduction.cc: Likewise.
* testsuite/23_containers/queue/members/emplace_cxx17_return.cc:
Likewise.
* testsuite/23_containers/set/cons/deduction.cc: Likewise.
* testsuite/23_containers/set/modifiers/extract.cc: Likewise.
* testsuite/23_containers/set/modifiers/merge.cc: Likewise.
* testsuite/23_containers/set/modifiers/node_swap.cc: Likewise.
* testsuite/23_containers/stack/deduction.cc: Likewise.
* testsuite/23_containers/stack/members/emplace_cxx17_return.cc:
Likewise.
* testsuite/23_containers/unordered_map/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_map/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
Likewise.
* testsuite/23_containers/unordered_map/modifiers/merge.cc:
Likewise.
* testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
Likewise.
* testsuite/23_containers/unordered_set/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_set/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/unordered_set/modifiers/merge.cc:
Likewise.
* testsuite/23_containers/vector/bool/emplace_cxx17_return.cc:
Likewise.
* testsuite/23_containers/vector/cons/89164_c++17.cc: Likewise.
* testsuite/23_containers/vector/cons/deduction.cc: Likewise.
* testsuite/23_containers/vector/modifiers/emplace/cxx17_return.cc:
Likewise.
2021-05-10 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string/79162.cc: Remove
-std=gnu++17 from dg-options directive.
* testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
* testsuite/21_strings/basic_string/cons/char/79162.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/char/86138.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/char/9.cc: Likewise.
* testsuite/21_strings/basic_string/cons/char/deduction.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/79162.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/86138.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/9.cc: Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc:
Likewise.
* testsuite/21_strings/basic_string/hash/hash.cc: Likewise.
* testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
* testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
* testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/compare/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/data/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/data/char/86169.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/find/char/5.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
Likewise.
* testsuite/21_strings/basic_string/operators/char/5.cc:
Likewise.
* testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
Likewise.
* testsuite/21_strings/basic_string_view/capacity/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/capacity/empty_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/char/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc: