blob: 19ca5d7af1d61e1581448decea12f004cfa1ccef [file] [log] [blame]
2023-05-29 Release Manager
* GCC 11.4.0 released.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-05-23 Matthias Kretz <m.kretz@gsi.de>
PR libstdc++/109261
* include/experimental/bits/simd.h (_SimdWrapper::_M_set):
Avoid vector builtin subscripting in constant expressions.
(resizing_simd_cast): Avoid memcpy if constant_evaluated.
(const_where_expression, where_expression, where)
(__extract_part, simd_mask, _SimdIntOperators, simd): Add either
_GLIBCXX_SIMD_CONSTEXPR (on public APIs), or constexpr (on
internal APIs).
* include/experimental/bits/simd_builtin.h (__vector_permute)
(__vector_shuffle, __extract_part, _GnuTraits::_SimdCastType1)
(_GnuTraits::_SimdCastType2, _SimdImplBuiltin)
(_MaskImplBuiltin::_S_store): Add constexpr.
(_CommonImplBuiltin::_S_store_bool_array)
(_SimdImplBuiltin::_S_load, _SimdImplBuiltin::_S_store)
(_SimdImplBuiltin::_S_reduce, _MaskImplBuiltin::_S_load): Add
constant_evaluated case.
* include/experimental/bits/simd_fixed_size.h
(_S_masked_load): Reword comment.
(__tuple_element_meta, __make_meta, _SimdTuple::_M_apply_r)
(_SimdTuple::_M_subscript_read, _SimdTuple::_M_subscript_write)
(__make_simd_tuple, __optimize_simd_tuple, __extract_part)
(__autocvt_to_simd, _Fixed::__traits::_SimdBase)
(_Fixed::__traits::_SimdCastType, _SimdImplFixedSize): Add
constexpr.
(_SimdTuple::operator[], _M_set): Add constexpr and add
constant_evaluated case.
(_MaskImplFixedSize::_S_load): Add constant_evaluated case.
* include/experimental/bits/simd_scalar.h: Add constexpr.
* include/experimental/bits/simd_x86.h (_CommonImplX86): Add
constexpr and add constant_evaluated case.
(_SimdImplX86::_S_equal_to, _S_not_equal_to, _S_less)
(_S_less_equal): Value-initialize to satisfy constexpr
evaluation.
(_MaskImplX86::_S_load): Add constant_evaluated case.
(_MaskImplX86::_S_store): Add constexpr and constant_evaluated
case. Value-initialize local variables.
(_MaskImplX86::_S_logical_and, _S_logical_or, _S_bit_not)
(_S_bit_and, _S_bit_or, _S_bit_xor): Add constant_evaluated
case.
* testsuite/experimental/simd/pr109261_constexpr_simd.cc: New
test.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-05-24 Matthias Kretz <m.kretz@gsi.de>
PR libstdc++/109949
* include/experimental/bits/simd.h (__intrinsic_type): If
__ALTIVEC__ is defined, map gnu::vector_size types to their
corresponding __vector T types without losing unsignedness of
integer types. Also prefer long long over long.
* include/experimental/bits/simd_ppc.h (_S_popcount): Cast mask
object to the expected unsigned vector type.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-05-24 Matthias Kretz <m.kretz@gsi.de>
PR libstdc++/109261
* include/experimental/bits/simd.h (__intrinsic_type):
Specialize __intrinsic_type<double, 8> and
__intrinsic_type<double, 16> in any case, but provide the member
type only with __aarch64__.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-05-24 Matthias Kretz <m.kretz@gsi.de>
PR libstdc++/109261
* include/experimental/bits/simd_neon.h (_S_reduce): Add
constexpr and make NEON implementation conditional on
not __builtin_is_constant_evaluated.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-05-22 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_builtin.h (_S_fpclassify): Move
__infn into #ifdef'ed block.
* testsuite/experimental/simd/tests/fpclassify.cc: Declare
constants only when used.
* testsuite/experimental/simd/tests/frexp.cc: Likewise.
* testsuite/experimental/simd/tests/logarithm.cc: Likewise.
* testsuite/experimental/simd/tests/trunc_ceil_floor.cc:
Likewise.
* testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc:
Move totest and expect1 into #ifdef'ed block.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-03-28 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h (is_simd_flag_type): New.
(_IsSimdFlagType): New.
(copy_from, copy_to, load ctors): Constrain _Flags using
_IsSimdFlagType.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-03-28 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_x86.h (_SimdImplX86): Use
_Base::_S_divides if the optimized _S_divides function is hidden
via the preprocessor.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-03-21 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_detail.h: Don't declare the
simd API as constexpr with Clang.
* include/experimental/bits/simd_x86.h (__movm): New.
(_S_blend_avx512): Resolve FIXME. Implement blend using __movm
and ?:.
(_SimdImplX86::_S_masked_unary): Clang does not implement the
same builtins. Implement the function using __movm, ?:, and -
operators on vector_size types instead.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-24 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h: Line breaks and indenting
fixed to follow the libstdc++ standard.
* include/experimental/bits/simd_builtin.h: Likewise.
* include/experimental/bits/simd_fixed_size.h: Likewise.
* include/experimental/bits/simd_neon.h: Likewise.
* include/experimental/bits/simd_ppc.h: Likewise.
* include/experimental/bits/simd_scalar.h: Likewise.
* include/experimental/bits/simd_x86.h: Likewise.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-24 Matthias Kretz <m.kretz@gsi.de>
PR libstdc++/108030
* include/experimental/bits/simd_fixed_size.h
(_SimdImplFixedSize::_S_broadcast): Replace inline with
_GLIBCXX_SIMD_INTRINSIC.
(_SimdImplFixedSize::_S_generate): Likewise.
(_SimdImplFixedSize::_S_load): Likewise.
(_SimdImplFixedSize::_S_masked_load): Likewise.
(_SimdImplFixedSize::_S_store): Likewise.
(_SimdImplFixedSize::_S_masked_store): Likewise.
(_SimdImplFixedSize::_S_min): Likewise.
(_SimdImplFixedSize::_S_max): Likewise.
(_SimdImplFixedSize::_S_complement): Likewise.
(_SimdImplFixedSize::_S_unary_minus): Likewise.
(_SimdImplFixedSize::_S_plus): Likewise.
(_SimdImplFixedSize::_S_minus): Likewise.
(_SimdImplFixedSize::_S_multiplies): Likewise.
(_SimdImplFixedSize::_S_divides): Likewise.
(_SimdImplFixedSize::_S_modulus): Likewise.
(_SimdImplFixedSize::_S_bit_and): Likewise.
(_SimdImplFixedSize::_S_bit_or): Likewise.
(_SimdImplFixedSize::_S_bit_xor): Likewise.
(_SimdImplFixedSize::_S_bit_shift_left): Likewise.
(_SimdImplFixedSize::_S_bit_shift_right): Likewise.
(_SimdImplFixedSize::_S_remquo): Add inline keyword (to be
explicit about not always-inline, yet).
(_SimdImplFixedSize::_S_isinf): Likewise.
(_SimdImplFixedSize::_S_isfinite): Likewise.
(_SimdImplFixedSize::_S_isnan): Likewise.
(_SimdImplFixedSize::_S_isnormal): Likewise.
(_SimdImplFixedSize::_S_signbit): Likewise.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-24 Matthias Kretz <m.kretz@gsi.de>
PR libstdc++/108856
* include/experimental/bits/simd_builtin.h
(_SimdImplBuiltin::_S_masked_unary): More efficient
implementation of masked inc-/decrement for integers and floats
without AVX2.
* include/experimental/bits/simd_x86.h
(_SimdImplX86::_S_masked_unary): New. Use AVX512 masked subtract
builtins for masked inc-/decrement.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-23 Matthias Kretz <m.kretz@gsi.de>
* testsuite/experimental/simd/tests/reductions.cc: Introduce
max_distance as the type-dependent max error.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-23 Matthias Kretz <m.kretz@gsi.de>
PR libstdc++/108030
* include/experimental/bits/simd_detail.h
(_GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA): Define as empty for
__clang__.
2023-05-25 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-16 Matthias Kretz <m.kretz@gsi.de>
PR libstdc++/108030
* include/experimental/bits/simd_detail.h: Define
_GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA.
* include/experimental/bits/simd.h: Annotate lambdas with
_GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA.
* include/experimental/bits/simd_builtin.h: Ditto.
* include/experimental/bits/simd_converter.h: Ditto.
* include/experimental/bits/simd_fixed_size.h: Ditto.
* include/experimental/bits/simd_math.h: Ditto.
* include/experimental/bits/simd_neon.h: Ditto.
* include/experimental/bits/simd_x86.h: Ditto.
2023-05-22 Patrick Palka <ppalka@redhat.com>
Backported from master:
2023-03-14 Patrick Palka <ppalka@redhat.com>
* include/bits/stl_iterator.h (move_iterator::_S_iter_concept):
Define.
(__cpp_lib_move_iterator_concept): Define for C++20.
(move_iterator::iterator_concept): Strengthen as per P2520R0.
* include/std/version (__cpp_lib_move_iterator_concept): Define
for C++20.
* testsuite/24_iterators/move_iterator/p2520r0.cc: New test.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-11-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/107801
* src/c++17/memory_resource.cc (chunk::_M_bytes): Change type
from uint32_t to bitset::size_type. Adjust static assertion.
(__pool_resource::_Pool::replenish): Cast to size_t after
multiplication instead of before.
(__pool_resource::_M_alloc_pools): Ensure both arguments to
std::max have type size_t.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-11-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/107801
* src/c++17/memory_resource.cc (pool_sizes): Disable large pools
for targets with 16-bit int.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-09-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91456
* include/std/type_traits (__is_nothrow_invocable): Remove.
(__is_invocable_impl::__nothrow_type): New member type which
checks if the conversion can throw.
(__is_nt_invocable_impl): Replace class template with alias
template to __is_nt_invocable_impl::__nothrow_type.
* testsuite/20_util/is_nothrow_invocable/91456.cc: New test.
* testsuite/20_util/is_nothrow_convertible/value.cc: Remove
macro used by value_ext.cc test.
* testsuite/20_util/is_nothrow_convertible/value_ext.cc: Remove
test for non-standard __is_nothrow_invocable trait.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-09-08 Jonathan Wakely <jwakely@redhat.com>
* include/c_global/cstddef (byte): Add always_inline attribute
to all operator overloads.
(to_integer): Add always_inline attribute.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-07-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_ops.h: Add nodiscard to all pure functions.
* include/experimental/bits/fs_ops.h: Likewise.
* testsuite/27_io/filesystem/operations/all.cc: Do not discard
results of absolute and canonical.
* testsuite/27_io/filesystem/operations/absolute.cc: Cast
discarded result to void.
* testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
* testsuite/27_io/filesystem/operations/exists.cc: Likewise.
* testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
* testsuite/27_io/filesystem/operations/read_symlink.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/operations/canonical.cc:
Likewise.
* testsuite/experimental/filesystem/operations/exists.cc:
Likewise.
* testsuite/experimental/filesystem/operations/is_empty.cc:
Likewise.
* testsuite/experimental/filesystem/operations/read_symlink.cc:
Likewise.
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Likewise.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-02-02 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (variant::operator=): Implement resolution
of LWG 3585.
* testsuite/20_util/variant/lwg3585.cc: New test.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-11-11 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/tuple/swap.cc (MoveOnly::operator==): Add
const qualifier.
* testsuite/26_numerics/valarray/87641.cc (X::operator==):
Likewise.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-03-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104875
* src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to
hold octets that will be left-shifted.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-11-03 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_algobase.h (__detail::__copy_or_move):
Move output iterator.
* testsuite/25_algorithms/copy/constrained.cc: Check copying to
move-only output iterator.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-12-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/108118
* include/bits/shared_ptr_base.h (weak_ptr::operator=):
Implement as move-and-swap exactly as specified in the standard.
* testsuite/20_util/weak_ptr/cons/self_move.cc: New test.
2023-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-01-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/108265
* include/std/chrono (hh_mm_ss): Do not use chrono::abs if
duration rep is unsigned. Remove incorrect noexcept-specifier.
* testsuite/std/time/hh_mm_ss/1.cc: Check unsigned rep. Check
floating-point representations. Check default construction.
2023-05-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2023-04-24 Patrick Palka <ppalka@redhat.com>
* include/bits/max_size_type.h (__max_diff_type::operator>>=):
Fix propagation of sign bit.
* testsuite/std/ranges/iota/max_size_type.cc: Avoid using the
non-standard 'signed typedef-name'. Add some compile-time tests
for right-shifting a negative __max_diff_type value by more than
one.
2023-05-03 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105844
* include/experimental/numeric (lcm): Use built-in instead of
__is_constant_evaluated.
* include/std/numeric (__abs_r, lcm): Likewise.
* testsuite/26_numerics/gcd/105844.cc: Add dg-prune-output.
* testsuite/26_numerics/lcm/105844.cc: Likewise.
2023-05-03 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-06-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105844
* include/experimental/numeric (experimental::gcd): Simplify
assertions. Use __abs_r instead of __absu.
(experimental::lcm): Likewise. Remove use of __detail::__lcm so
overflow can be detected.
* include/std/numeric (__detail::__absu): Rename to __abs_r and
change to allow signed result type, so overflow can be detected.
(__detail::__lcm): Remove.
(gcd): Simplify assertions. Use __abs_r instead of __absu.
(lcm): Likewise. Remove use of __detail::__lcm so overflow can
be detected.
* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
* testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
* testsuite/26_numerics/gcd/105844.cc: New test.
* testsuite/26_numerics/lcm/105844.cc: New test.
2023-05-03 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-04-28 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (STRIP_FROM_PATH): Remove prefixes
from header paths.
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-09-14 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Document LWG 1203.
* doc/html/*: Regenerate.
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-09-07 Jonathan Wakely <jwakely@redhat.com>
* include/std/barrier: Add missing runtime exception.
2023-04-27 François Dumont <fdumont@gcc.gnu.org>
Backported from master:
2022-05-26 François Dumont <fdumont@gcc.gnu.org>
* python/libstdcxx/v6/printers.py (StdSpanPrinter.__init__):
Strip typename from version namespace.
2023-04-27 Philipp Fent <fent@in.tum.de>
Backported from master:
2022-04-25 Philipp Fent <fent@in.tum.de>
* python/libstdcxx/v6/printers.py (StdSpanPrinter._iterator):
Rename as iterator.
(StdInitializerListPrinter): Define new printer.
(build_libstdcxx_dictionary): Register new printer.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Check printer for
initializer_list.
2023-04-27 Philipp Fent <fent@in.tum.de>
Backported from master:
2022-04-19 Philipp Fent <fent@in.tum.de>
* python/libstdcxx/v6/printers.py (StdSpanPrinter): Define.
* testsuite/libstdc++-prettyprinters/cxx20.cc: Test it.
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
* include/std/atomic: Add missing @endcond doxygen comment.
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-04-04 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/extensions.xml: Remove std::bad_exception from
example program.
* doc/html/manual/ext_demangling.html: Regenerate.
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (SOURCE_BROWSER): Only set to YES for
HTML docs.
* include/bits/gslice_array.h (_DEFINE_VALARRAY_OPERATOR): Omit
from doxygen docs.
* include/bits/indirect_array.h (_DEFINE_VALARRAY_OPERATOR):
Likewise.
* include/bits/mask_array.h (_DEFINE_VALARRAY_OPERATOR):
Likewise.
* include/bits/slice_array.h (_DEFINE_VALARRAY_OPERATOR):
Likewise.
* include/std/valarray (_DEFINE_VALARRAY_UNARY_OPERATOR)
(_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT)
(_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT)
(_DEFINE_BINARY_OPERATOR): Likewise.
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-10-28 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (path::filename()): Fix dangling
reference.
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/109064
* python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker):
Remove self-recursion in __init__. Add missing _supports.
* testsuite/libstdc++-xmethods/shared_ptr.cc: Check use_count()
and unique().
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-02-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/108952
* include/bits/uses_allocator_args.h
(uses_allocator_construction_args): Implement LWG 3527.
* testsuite/20_util/pair/astuple/get-2.cc: New test.
* testsuite/20_util/scoped_allocator/108952.cc: New test.
* testsuite/20_util/uses_allocator/lwg3527.cc: New test.
2023-04-27 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-02-16 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/optional: Fix header name in comment.
2023-03-21 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-03-21 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_detail.h: Don't define
_GLIBCXX_SIMD_WORKAROUND_PR90993 for Clang.
* include/experimental/bits/simd_x86.h (_S_divides): Remove
check for __clang__.
2023-03-21 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-03-21 Matthias Kretz <m.kretz@gsi.de>
* testsuite/experimental/simd/tests/operators.cc: Clang doesn't
define __GCC_IEC_559. Use __STDC_IEC_559__ instead.
2023-03-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-02-02 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/108636
* include/bits/fs_path.h (path::path(string_view, _Type))
(path::_Cmpt::_Cmpt(string_view, _Type, size_t)): Move inline
definitions to ...
* src/c++17/fs_path.cc: ... here.
* testsuite/27_io/filesystem/path/108636.cc: New test.
2023-03-16 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_ops.cc [AVR] (not_supported): Define as a macro
for function_not_supported.
* src/filesystem/ops-common.h [AVR] (ENOTSUP): Define as a macro
for ENOSYS.
2023-03-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-02-01 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/random.cc (random_device::_M_fini): Do not try to
close the file handle if the target doesn't support the
/dev/random and /dev/urandom files.
2023-03-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2023-02-01 Jonathan Wakely <jwakely@redhat.com>
* config/os/generic/error_constants.h (errc::value_too_large)
[__AVR__]: Define.
* src/c++11/system_error.cc
(system_category::default_error_condition) [__AVR__]: Only match
recognize values equal to EDOM, ERANGE, ENOSYS and EINTR.
* src/c++17/fs_ops.cc (fs::current_path) [__AVR__]: Do not use
getcwd.
* src/filesystem/ops-common.h [__AVR__]: Do not use POSIX open,
close etc.
2023-03-10 Thomas W Rodgers <rodgert@twrodgers.com>
Backported from master:
2023-02-14 Thomas W Rodgers <rodgert@twrodgers.com>
PR libstdc++/103934
* include/std/atomic (atomic_flag_wait): Add.
(atomic_flag_wait_explicit): Add.
(atomic_flag_notify): Add.
(atomic_flag_notify_explicit): Add.
* testsuite/29_atomics/atomic_flag/wait_notify/1.cc:
Add test case to cover missing atomic_flag free functions.
2023-02-23 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-23 Matthias Kretz <m.kretz@gsi.de>
PR libstdc++/108030
* include/experimental/bits/simd.h (__vector_broadcast):
Implement via __vector_broadcast_impl instead of
__call_with_n_evaluations + 2 lambdas.
(__vector_broadcast_impl): New.
2023-02-23 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-23 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_builtin.h (_S_set): Compare as
int. The actual range of these indexes is very small.
2023-02-23 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-23 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_x86.h (_S_bit_shift_left)
(_S_bit_shift_right): Declare constexpr. The implementation was
already expecting constexpr evaluation.
2023-02-23 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-20 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h (__extract_part, split):
Use reserved name for template parameter.
2023-02-16 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-16 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd_x86.h
(_SimdImplX86::_S_not_equal_to, _SimdImplX86::_S_less)
(_SimdImplX86::_S_less_equal): Do not call
__builtin_is_constant_evaluated in constexpr-if.
2023-02-16 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-16 Matthias Kretz <m.kretz@gsi.de>
* testsuite/experimental/simd/tests/bits/verify.h
(verify::verify): Use %zx for size_t in format string.
2023-02-16 Matthias Kretz <m.kretz@gsi.de>
Backported from master:
2023-02-16 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h
(_SimdWrapper::_M_is_constprop_none_of)
(_SimdWrapper::_M_is_constprop_all_of): Return false unless the
computed result still satisfies __builtin_constant_p.
2023-02-14 Thomas W Rodgers <rodgert@twrodgers.com>
Backported from master:
2023-02-14 Thomas W Rodgers <rodgert@twrodgers.com>
PR libstdc++/103934
* include/std/atomic (atomic_flag_test): Add.
(atomic_flag_test_explicit): Add.
* testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
test case to cover missing atomic_flag free functions.
* testsuite/29_atomics/atomic_flag/test/implicit.cc:
Likewise.
2023-02-02 Detlef Vollmann <dv@vollmann.ch>
Backported from master:
2022-03-10 Detlef Vollmann <dv@vollmann.ch>
PR libstdc++/104866
* include/bits/this_thread_sleep.h: Fix order of #endif and
closing brace of namespace.
2023-01-18 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-08-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106183
* include/bits/atomic_wait.h (__waiter_pool_base::_M_notify):
Move increment of _M_ver here.
[!_GLIBCXX_HAVE_PLATFORM_WAIT]: Lock mutex around increment.
Use relaxed memory order and always notify all waiters.
(__waiter_base::_M_do_wait) [!_GLIBCXX_HAVE_PLATFORM_WAIT]:
Check value again after locking mutex.
(__waiter_base::_M_notify): Remove increment of _M_ver.
2022-12-22 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-11-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/107814
* testsuite/experimental/filesystem/iterators/error_reporting.cc:
Use a static buffer with space after it.
2022-11-08 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-11-08 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/authors.xml: Remove empty author element.
* doc/xml/manual/spine.xml: Likewise.
* doc/html/*: Regenerate.
2022-09-07 Jonathan Wakely <jwakely@redhat.com>
* include/std/version [!_GLIBCXX_HOSTED]
(__cpp_lib_bit_cast): Define for freestanding.
(__cpp_lib_string_contains): Do not define for freestanding.
(__cpp_lib_to_underlying): Likewise.
2022-09-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-08-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106607
* include/bits/regex_compiler.tcc (_Compiler::_M_cur_int_value):
Use built-ins to check for integer overflow in back-reference
number.
* testsuite/28_regex/basic_regex/106607.cc: New test.
2022-09-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-08-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106695
* include/bits/std_thread.h (thread::_State_impl): Forward
individual arguments to _Invoker constructor.
(thread::_Invoker): Add constructor. Delete copies.
* include/std/future (__future_base::_Deferred_state): Forward
individual arguments to _Invoker constructor.
(__future_base::_Async_state_impl): Likewise.
* testsuite/30_threads/async/106695.cc: New test.
* testsuite/30_threads/thread/106695.cc: New test.
2022-09-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-07-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106248
* include/std/istream [C++17] (operator>>(istream&, char*)):
Set eofbit if we stopped extracting at EOF.
* testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc:
New test.
* testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc:
New test.
2022-09-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-07-29 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104443
* include/bits/stl_iterator.h (common_iterator::operator->):
Change return type to just auto.
2022-09-05 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-08-04 Jonathan Wakely <jwakely@redhat.com>
* include/std/string_view (basic_string_view(Range&&)): Add
explicit as per P2499R0.
* testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc:
Adjust implicit conversions. Check implicit conversions fail.
* testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc:
Likewise.
2022-07-26 Thomas Rodgers <trodgers@redhat.com>
Backported from master:
2022-07-26 Thomas Rodgers <trodgers@redhat.com>
* include/bits/atomic_wait.h (__atomic_spin): Merge spin loops.
2022-07-22 Patrick Palka <ppalka@redhat.com>
PR libstdc++/106320
* include/std/ranges (single_view): Relax constraints on
default constructor so as to preserve pre-P2325R3 behavior.
(filter_view): Likewise.
(transform_view): Likewise.
(take_while_view): Likewise.
(drop_while_view): Likewise.
* testsuite/std/ranges/adaptors/join.cc (test13): New test.
* testsuite/std/ranges/p2325.cc: Fix S to be only non default
constructible and not also non copy constructible. XFAIL the
tests that verify a non default constructible functor makes a
view non default constructible (lines 94, 97 and 98). XFAIL
the test that effectively verifies a non default constructible
element type makes single_view non default constructible (line
114).
2022-07-22 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-07-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100823
* include/bits/stl_iterator.h (common_iterator): Define move
constructor and move assignment operator.
(common_iterator::_M_assign): New function implementing
assignment.
(common_iterator::operator=): Use _M_assign.
(common_iterator::_S_valueless): New constant.
* testsuite/24_iterators/common_iterator/100823.cc: New test.
2022-07-22 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-07-20 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (common_iterator): Fix incorrect
uses of is_nothrow_assignable_v. Fix inconsistent constraints on
friend declaration. Do not move argument in copy constructor.
* testsuite/24_iterators/common_iterator/1.cc: Check for
noexcept constructibnle/assignable.
2022-07-22 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103992
* include/bits/stl_iterator.h (common_iterator): Use
std::construct_at instead of placement new.
* testsuite/24_iterators/common_iterator/1.cc: Check copy
construction is usable in constant expressions.
2022-07-22 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-11 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (common_iterator): Add constexpr
to all member functions (LWG 3574).
* testsuite/24_iterators/common_iterator/1.cc: Evaluate some
tests as constant expressions.
* testsuite/24_iterators/common_iterator/2.cc: Likewise.
2022-07-22 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-06-28 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/from_chars/4.cc: Only use log2 if C99 math
functions are available.
2022-07-22 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-06-30 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/88881
* src/filesystem/ops.cc (has_trailing_slash): New helper
function.
(fs::status): Strip trailing slashes.
(fs::symlink_status): Likewise.
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Clean the environment before each test and use TMP instead of
TMPDIR so the test passes on Windows.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-07-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106162
* include/Makefile.am (largefile-config.h): Add
stamp-${host_alias} prerequisite.
* include/Makefile.in: Regenerate.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-06-23 Jonathan Wakely <jwakely@redhat.com>
* testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
rmdir to remove directories.
* testsuite/experimental/filesystem/iterators/error_reporting.cc:
Likewise.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (counted_iterator::operator++(int)):
Add 'constexpr' as per LWG 3643.
* testsuite/24_iterators/counted_iterator/lwg3643.cc: New test.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-05-27 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105671
* include/std/sstream (basic_stringbuf::_M_high_mark): Add
always_inline attribute.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/std/future (launch): Make operators noexcept.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h (ranges::size, ranges::empty): Add
explicit check for unbounded arrays before using ranges::begin.
* testsuite/std/ranges/access/empty.cc: Check handling of unbounded
arrays.
* testsuite/std/ranges/access/size.cc: Likewise.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102447
* include/bits/regex_compiler.h (_Compiler::_BracketState): New
class.
(_Compiler::_BrackeyMatcher): New alias template.
(_Compiler::_M_expression_term): Change pair<bool, CharT>
parameter to _BracketState. Process first character for
ECMAScript syntax as well as POSIX.
* include/bits/regex_compiler.tcc
(_Compiler::_M_insert_bracket_matcher): Pass _BracketState.
(_Compiler::_M_expression_term): Use _BracketState to store
state between calls. Improve handling of dashes in ranges.
* testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
Add more tests for ranges containing dashes. Check invalid
ranges with character class at the beginning.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-10 Jonathan Wakely <jwakely@redhat.com>
* testsuite/28_regex/algorithms/regex_replace/char/103664.cc:
Add dg-timeout-factor directive.
* testsuite/28_regex/basic_regex/84110.cc: Likewise.
* testsuite/28_regex/basic_regex/ctors/char/other.cc: Likewise.
* testsuite/28_regex/match_results/102667.cc: Likewise.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-13 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103664
* include/bits/regex.h (__regex_replace): Declare.
(regex_replace): Use it.
* include/bits/regex.tcc (__regex_replace): Replace regex_replace
definition with __regex_replace.
* testsuite/28_regex/algorithms/regex_replace/char/103664.cc: New test.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-15 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (__detail::__variant::__get_storage):
Remove unused function.
(__variant_construct_by_index): Set index after construction is
complete. Rename to ...
(__detail::__variant::__construct_by_index): ... this.
(variant): Use new name for __variant_construct_by_index friend
declaration. Remove __get_storage friend declaration.
(variant::emplace): Use new name and remove try-blocks.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-09-30 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (basic_regex::multiline): Fix #if
condition.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Backported from master:
2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/28_regex/basic_regex/84110.cc (test01)
[__cpp_exceptions]: Disambiguate extended.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-15 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (_Variant_storage::_M_storage()): Remove.
(__detail::__variant::__get_storage): Remove.
(variant): Remove friend declaration of __get_storage.
2022-07-07 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2022-04-02 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/105128
* include/std/source_location (std::source_location::__impl): Move
definition before using __builtin_ret_type.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-24 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104602
* include/std/source_location (source_location::current): Use
deduced type of __builtin_source_location().
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-04-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (hash<filesystem::path>): Define.
* testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
Check std::hash specialization.
2022-06-15 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-06-13 Jonathan Wakely <jwakely@redhat.com>
* include/std/atomic (__atomic_val_t): Use __type_identity_t
instead of atomic<T>::value_type, as per LWG 3220.
* testsuite/29_atomics/atomic/lwg3220.cc: New test.
2022-06-15 Mark Mentovai <mark@mentovai.com>
Backported from master:
2022-06-13 Mark Mentovai <mark@mentovai.com>
* include/experimental/bits/fs_path.h (__detail::__null_terminated):
Rename to __nul_terminated to avoid colliding with a macro in
Apple's SDK.
2022-06-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105915
* include/experimental/bits/fs_path.h (path::begin, path::end):
Remove noexcept from declarations.
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2023.xml: Update status.
* doc/html/manual/status.html: Regenerate.
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/prerequisites.xml: Fix attributes for external
hyperlink.
* doc/html/manual/setup.html: Regenerate.
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Include new chapter.
* doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
* doc/xml/manual/status_cxx2023.xml: New file.
* doc/html/*: Regenerate.
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
* doc/html/manual/status.html: Regenerate.
* doc/xml/manual/status_cxx2020.xml: Fix supported version for
C++20 bit operations.
2022-05-13 Alexandre Oliva <oliva@adacore.com>
Backported from master:
2022-05-06 Alexandre Oliva <oliva@adacore.com>
* include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
for double, long long, and 64-bit long intrinsic types.
[__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
preexisting long double diagnostic, adjust no-VSX double
diagnostic to cover 64-bit long double as well.
2022-05-11 Patrick Palka <ppalka@redhat.com>
Backported from master:
2022-05-02 Patrick Palka <ppalka@redhat.com>
PR libstdc++/103911
* src/c++17/floating_from_chars.cc (find_end_of_float): Accept
two delimeters for the exponent part in the form of a possibly
NULL string of length two. Don't use std::tolower.
(pattern): Adjust calls to find_end_of_float accordingly.
2022-05-10 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-05-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105284
* include/std/iosfwd: Add declarations for <synstream> class
templates and typedefs.
* include/std/syncstream (basic_syncbuf, basic_osyncstream):
Remove default template arguments.
* testsuite/27_io/headers/iosfwd/synopsis.cc: New test.
* testsuite/27_io/headers/iosfwd/types.cc: New test.
2022-05-09 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104217
* src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
* src/filesystem/dir.cc (_GNU_SOURCE): Define.
* src/filesystem/ops.cc (_GNU_SOURCE): Define.
2022-05-09 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-05-06 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105502
* include/bits/random.tcc
(operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
Update state when __state_avail is false.
* testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
Check that deserialized object equals serialized one.
2022-05-09 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-05-06 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104731
* testsuite/27_io/filesystem/iterators/error_reporting.cc:
Use a trailing char array as storage for dirent::d_name.
2022-05-06 Alexandre Oliva <oliva@adacore.com>
Backported from master:
2022-05-03 Alexandre Oliva <oliva@adacore.com>
PR c++/105324
* testsuite/20_util/from_chars/pr105324.cc: Guard test body
with conditional for floating-point overloads of from_char.
2022-04-28 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-04-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/99290
* src/c++17/fs_ops.cc (fs::copy): Pass error_code to
directory_iterator constructor, and check on each iteration.
* src/filesystem/ops.cc (fs::copy): Likewise.
* testsuite/27_io/filesystem/operations/copy.cc: Check for
errors during recursion.
* testsuite/experimental/filesystem/operations/copy.cc:
Likewise.
2022-04-26 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-04-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105375
* include/std/future (packaged_task): Add deduction guides.
* testsuite/30_threads/packaged_task/cons/deduction.cc: New test.
2022-04-22 Thomas W Rodgers <trodgers@redhat.com>
Backported from master:
2022-04-22 Thomas W Rodgers <trodgers@redhat.com>
PR libstdc++/102994
* include/bits/atomic_base.h (atomic_flag::notify_one,
notify_all): Remove const qualification.
(__atomic_base::notify_one, notify_all): Likewise.
* include/std/atomic (atomic<bool>::notify_one, notify_all):
Likewise.
(atomic::notify_one, notify_all): Likewise.
(atomic<T*>::notify_one, notify_all): Likewise.
(atomic_notify_one, atomic_notify_all): Likewise.
* testsuite/29_atomics/atomic/wait_notify/102994.cc: Adjust test
to account for change in notify_one/notify_all signature.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-26 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/96592
* include/std/tuple (tuple::is_constructible): Remove.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-11 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/monotonic_buffer_resource/allocate.cc:
Ignore -Walloc-larger-than warning.
* testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
Likewise.
* testsuite/29_atomics/atomic/cons/user_pod.cc: Compile with -O1
to avoid linker error for __atomic_is_lock_free.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-09 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (operator==, operator<=>): Define
overloads for homogeneous specializations of reverse_iterator,
__normal_iterator and move_iterator.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-26 Jonathan Wakely <jwakely@redhat.com>
* testsuite/24_iterators/move_iterator/dr3265.cc: Fix test to
account for LWG 3435 resolution.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105324
* src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
Remove assertion.
* testsuite/20_util/from_chars/pr105324.cc: New test.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-30 Jonathan Wakely <jwakely@redhat.com>
* src/c++20/sstream-inst.cc (_GLIBCXX_USE_CXX11_ABI): Define to
select new ABI.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-30 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string/cons/char/moveable.cc: Allow
moved-from string to be non-empty.
* testsuite/21_strings/basic_string/cons/char/moveable2.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/assign/char/87749.cc:
Construct empty string before setting oom flag.
* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/87749.cc:
Likewise.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex_compiler.tcc (_Compiler::_M_match_token):
Use reserved name for parameter.
* testsuite/17_intro/names.cc: Check "token".
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-25 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/names.cc: Check 'sz'.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-11 Jonathan Wakely <jwakely@redhat.com>
* include/std/ranges (ranges::lazy_split_view::_InnerIter::end()):
Add neoxcept (LWG 3593).
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-17 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/internet (address): Use std::_Construct
to initialize union members.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/cxx11-ios_failure.cc (io_error_category): Define
class and virtual functions as 'final'.
(io_category_instance): Use constinit union to make the object
immortal.
* src/c++11/future.cc (future_error_category): Define class and
virtual functions as 'final'.
(future_category_instance): Use constinit union.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/span (span(Range&&)): Reorder constraints.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-01 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_path.cc (path::_M_split_cmpts()): Remove
micro-optimization for "/" path.
* src/filesystem/path.cc (path::_M_split_cmpts()): Only access
the contents of _M_pathname using const member functions.
2022-04-21 Pavel I. Kryukov <pavel.kryukov@phystech.edu>
Backported from master:
2022-01-06 Pavel I. Kryukov <pavel.kryukov@phystech.edu>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103853
* include/bits/forward_list.tcc (forward_list::merge): Check for
self-merge.
* testsuite/23_containers/forward_list/operations/merge.cc: New test.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_construct.h (_Construct, _Construct_novalue):
Also cast away cv-qualifiers when converting pointer to void.
* testsuite/20_util/allocator/void.cc: Test construct function
with cv-qualified types.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-06 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103911
* include/std/charconv (__from_chars_alpha_to_num): Return
char instead of unsigned char. Change invalid return value to
127 instead of using numeric trait.
(__from_chars_alnum): Fix comment. Do not use std::isdigit.
Change type of variable to char.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-27 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h (ranges::advance): Avoid signed
overflow. Do nothing if already equal to desired result.
* testsuite/24_iterators/range_operations/advance_overflow.cc:
New test.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-06 Jonathan Wakely <jwakely@redhat.com>
* testsuite/ext/rope/pthread7-rope.cc: Add dg-timeout-factor.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-03-03 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/names.cc (func): Undef on AIX.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-04-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/93602
* doc/xml/manual/prerequisites.xml: Document libiconv
workarounds.
* doc/html/manual/setup.html: Regenerate.
* src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
* src/Makefile.in: Regenerate.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-04-14 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Fix comment.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-04-20 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
Check correct feature test macro.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
PR middle-end/104966
* include/bits/locale_facets_nonio.tcc
(__moneypunct_cache::_M_cache): Store string sizes in local
variable that doesn't escape.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103848
* include/bits/stl_deque.h (operator-): Do not use 0 as null
pointer constant.
2022-04-21 Release Manager
* GCC 11.3.0 released.
2022-04-14 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx1998.xml: Refer to GCC 11 not
mainline.
* doc/xml/manual/status_cxx2011.xml: Likewise.
* doc/xml/manual/status_cxx2014.xml: Likewise.
* doc/xml/manual/status_cxx2017.xml: Likewise.
* doc/xml/manual/status_cxx2020.xml: Likewise.
* doc/xml/manual/status_cxxtr1.xml: Likewise.
* doc/xml/manual/status_cxxtr24733.xml: Likewise.
* doc/html/manual/status.html: Regenerate.
2022-04-14 Iain Sandoe <iain@sandoe.co.uk>
Backported from master:
2021-11-19 Iain Sandoe <iain@sandoe.co.uk>
* testsuite/lib/prune.exp: Prune dsymutil (ld64) warning.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-27 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100516
* include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
Add __builtin_unreachable to loop.
* testsuite/23_containers/deque/100516.cc: New test.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-09 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103630
* libsupc++/exception_ptr.h (exception_ptr): Fix exception
specifications on inline definitions.
(make_exception_ptr): Decay the template parameter. Use typeid
of the static type.
* testsuite/18_support/exception_ptr/103630.cc: New test.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-03-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105021
* include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include
<bits/atomic_wait.h> for freestanding.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103638
* include/bits/atomic_timed_wait.h: Check _GLIBCXX_HAS_GTHREADS
before using std::mutex and std::__condvar.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-04 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (__detail::__variant::__as): Add missing
noexcept to first overload.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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.
2022-04-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2022-01-12 Patrick Palka <ppalka@redhat.com>
PR libstdc++/103955
* src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
Track the excess precision separately from the effective
precision. Avoid overflow in bounds check by splitting it into
two checks.
(__floating_to_chars_precision): Avoid overflow in bounds checks
similarly.
* testsuite/20_util/to_chars/103955.cc: New test.
2022-04-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-10-21 Patrick Palka <ppalka@redhat.com>
* include/bits/stl_iterator.h (common_iterator::__arrow_proxy):
Make fully constexpr as per LWG 3595.
(common_iterator::__postfix_proxy): Likewise.
2022-04-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-10-21 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (split_view::base): Add forward_range
constraint as per LWG 3591.
(split_view::begin, lazy_split_view::end): Also check
simpleness of _Pattern as per LWG 3592.
2022-04-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-10-21 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (join_view::__iter_cat::_S_iter_cat): Adjust
criteria for returning bidirectional_iterator_tag as per LWG 3535.
(join_view::_Iterator::_S_iter_concept): Likewise.
2022-04-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-10-21 Patrick Palka <ppalka@redhat.com>
* include/bits/ranges_base.h (viewable_range): Adjust as per
LWG 3481.
* testsuite/std/ranges/adaptors/all.cc (test07): New test.
2022-04-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-10-19 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (iota_view::_Iterator::operator+): Adjust
definition as per LWG 3580.
(iota_view::_Iterator::operator-): Likewise.
2022-04-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-10-19 Patrick Palka <ppalka@redhat.com>
* include/bits/ranges_util.h
(__detail::__uses_nonqualification_pointer_conversion): Define
and use it ...
(__detail::__convertible_to_nonslicing): ... here, as per LWG 3470.
* testsuite/std/ranges/subrange/1.cc: New test.
2022-04-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-10-19 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (iota_view::_Iterator): Befriend iota_view.
(iota_view::_Sentinel): Likewise.
(iota_view::iota_view): Add three overloads, each taking an
iterator/sentinel pair as per LWG 3523.
* testsuite/std/ranges/iota/iota_view.cc (test06): New test.
2022-04-07 Patrick Palka <ppalka@redhat.com>
Backported from master:
2022-03-09 Patrick Palka <ppalka@redhat.com>
PR libstdc++/104859
* src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
Be explicit when narrowing the shifted effective_mantissa,
since it may have an integer-class type.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-17 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Replace
code that call cat->name() on std::error_category objects.
Identify known categories by symbol name and use a hardcoded
name. Print error code values as enumerators where appopriate.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected
name of custom category. Check io_errc and future_errc errors.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-03-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105027
* include/std/bit (bit_cast): Add constraints.
* testsuite/26_numerics/bit/bit.cast/105027.cc: New test.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-04-01 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/bits/fs_fwd.h (copy_file): Remove
incorrect noexcept from declaration.
* include/experimental/bits/fs_path.h (path::begin, path::end):
Add noexcept to declarations, to match definitions.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-08 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/filesystem/operations/create_directories.cc:
Adjust expected results for Windows.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-02 Jonathan Wakely <jwakely@redhat.com>
* testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
autoconf macro to check whether d_type is present.
* testsuite/experimental/filesystem/iterators/error_reporting.cc:
Likewise.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-01 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_dir.cc (recursive_directory_iterator::increment):
Reset state to past-the-end iterator on error.
(fs::recursive_directory_iterator::pop(error_code&)): Likewise.
(fs::recursive_directory_iterator::pop()): Check _M_dirs before
it might get reset.
* src/filesystem/dir.cc (recursive_directory_iterator): Likewise,
for the TS implementation.
* testsuite/27_io/filesystem/iterators/error_reporting.cc: New test.
* testsuite/experimental/filesystem/iterators/error_reporting.cc: New test.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/alloc_traits.h (allocator_traits<allocator<void>>):
Use std::_Construct for construct.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-04 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/bits/fs_ops.h (fs::copy_file): Remove
noexcept.
(fs::create_directories): Likewise.
(fs::remove_all): Likewise.
* src/filesystem/ops.cc (fs::copy_file): Remove noexcept.
(fs::create_directories): Likewise.
(fs::remove_all): Likewise.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_fwd.h (filesystem::perms): Fix comment.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103650
* include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
* include/Makefile.in: Regenerate.
* testsuite/17_intro/headers/c++1998/103650.cc: New test.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104098
* include/bits/stl_iterator.h (reverse_iterator): Check
__cpp_lib_concepts instead of __cplusplus.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-19 Jonathan Wakely <jwakely@redhat.com>
* configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Remove -gdwarf-4
from default flags.
* configure: Regenerate.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-17 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2020.xml: Use final C++20 option
names.
* doc/html/manual/status.html: Regenerate.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/allocator.h: Qualify std::allocator_traits in
deprecated warnings.
* libsupc++/exception (uncaught_exception): Add suggestion to
deprecated warning.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-15 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104542
* include/bits/uses_allocator_args.h (make_obj_using_allocator)
(uninitialized_construct_using_allocator): Add constexpr.
* testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
* testsuite/20_util/uses_allocator/uninitialized_construct.cc: New test.
2022-04-04 Timm Bäder <tbaeder@redhat.com>
Backported from master:
2022-04-01 Timm Bäder <tbaeder@redhat.com>
* include/bits/fs_ops.h: Fix filename in Doxygen comment.
* include/experimental/bits/fs_ops.h: Likewise.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-03-08 Jonathan Wakely <jwakely@redhat.com>
* include/bits/uses_allocator_args.h: Remove incorrect copyright
notice.
2022-04-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-02-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104301
* acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Print different messages
for stdio_pure and stdio_posix options.
* configure: Regenerate.
2022-02-17 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-10-21 Patrick Palka <ppalka@redhat.com>
PR libstdc++/102358
* include/bits/stl_iterator.h (__niter_base): Make constexpr
for C++20.
(__miter_base): Likewise.
* testsuite/25_algorithms/move/constexpr.cc: New test.
2022-02-11 Patrick Palka <ppalka@redhat.com>
PR libstdc++/103904
* include/std/ranges (__detail::__box): Revert r11-9555 changes
to the constraints on the partial specialization and the
now-unnecessary special member functions.
(__detail::__non_propagating_cache::operator=): Remove
now-unused overload added by r11-9555.
(split_view::_OuterIter::__current): Adjust after reverting the
r11-9555 change to the type of _M_current.
(split_view::_M_current): Revert r11-9555 change to its type.
(split_view::split_view): Constrain the default constructor
further.
* testsuite/std/ranges/adaptors/detail/copyable_box.cc: Disable
now-irrelevant test for the r11-9555 changes to the partial
specialization of __box.
2022-02-11 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-07-16 Patrick Palka <ppalka@redhat.com>
PR libstdc++/103904
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.
2022-02-11 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-06-21 Patrick Palka <ppalka@redhat.com>
PR libstdc++/103904
* include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
2022-02-11 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-06-18 Patrick Palka <ppalka@redhat.com>
PR libstdc++/103904
* 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 (common_iterator): Constrain the
default ctor.
(counted_iterator): Likewise.
* 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.
(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/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.
2022-02-10 Thomas Rodgers <rodgert@appliantology.com>
Backported from master:
2022-02-10 Thomas Rodgers <rodgert@appliantology.com>
* include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
__waiter_base::_S_do_spin_v): Change memory order from relaxed
to acquire.
2022-02-09 Thomas Rodgers <rodgert@appliantology.com>
Backported from master:
2022-02-09 Thomas Rodgers <rodgert@appliantology.com>
PR libstdc++/104442
* include/bits/atomic_wait.h (__waiter::_M_do_wait_v): Move spin
loop inside do loop so that threads failing the wait, reload
_M_ver.
2022-02-01 Thomas Rodgers <rodgert@appliantology.com>
Backported from master:
2022-02-01 Thomas Rodgers <rodgert@appliantology.com>
* include/bits/atomic_wait.h: Change memory order from
Acquire/Release with relaxed loads to SeqCst+Release for
accesses to the waiter's count.
2022-01-10 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-10 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/using.xml: Update documentation around default
-std option.
* doc/html/*: Regenerate.
2022-01-10 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100017
* src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++.
* src/c++17/Makefile.in: Regenerate.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-18 Jonathan Wakely <jwakely@redhat.com>
* include/bits/char_traits.h (__gnu_cxx::char_traits::move):
Do not compare unrelated pointers during constant evaluation.
* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
Improve tests for char_traits::move.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-10 Jonathan Wakely <jwakely@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add _GLIBCXX_
prefix to NO_SLEEP macro.
* config.h.in: Regenerate.
* configure: Regenerate.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103877
* doc/xml/faq.xml: Add '-x c++' to preprocessor command.
* doc/html/faq.html: Regenerate.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103501
* include/bits/stl_tree.h (_Rb_tree(_Rb_tree&&, false_type)):
Clear container if elements have been moved-from.
* testsuite/23_containers/map/allocator/move_cons.cc: Expect
moved-from container to be empty.
* testsuite/23_containers/multimap/allocator/move_cons.cc:
Likewise.
* testsuite/23_containers/multiset/allocator/103501.cc: New test.
* testsuite/23_containers/set/allocator/103501.cc: New test.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-12-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103549
* include/bits/regex.h (match_results): Give names to template
parameters in first declaration.
(match_results::_M_begin): Add default member-initializer.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-30 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103453
* config/allocator/malloc_allocator_base.h
(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Define for Clang.
* config/allocator/new_allocator_base.h
(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Likewise.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103919
* include/bits/basic_string.h (basic_string(const T&, size_t, size_t)):
Relax constraints on string_view parameter.
[!_GLIBCXX_USE_CXX11_ABI] (basic_string(const T&, size_t, size_t)):
Likewise.
* testsuite/21_strings/basic_string/cons/char/103919.cc: New test.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
versioned namespace from the type name that is printed.
2022-01-04 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-12-10 Thomas Rodgers <rodgert@twrodgers.com>
Backported from master:
2021-12-10 Thomas Rodgers <rodgert@twrodgers.com>
PR libstdc++/102994
* include/bits/atomic_base.h (__atomic_base<_PTp*>::wait()):
Add const qualifier.
* include/std/atomic (atomic<_Tp*>::wait(), atomic_wait()):
Likewise.
* testsuite/29_atomics/atomic/wait_notify/102994.cc:
New test.
2021-11-26 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-26 Jonathan Wakely <jwakely@redhat.com>
* testsuite/29_atomics/atomic_float/1.cc: Reorder directives.
2021-11-26 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-26 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
Change dg-do compile to run.
* testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
Likewise.
2021-11-26 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/96416
* include/bits/ptr_traits.h (pointer_traits): Remove
static_assert checking for valid element_type.
(pointer_traits::element_type, pointer_traits::pointer_to):
Do not define when element type cannot be deduced.
* testsuite/20_util/pointer_traits/lwg3545.cc: New test.
* testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line.
* testsuite/20_util/to_address/lwg3545.cc: New test.
2021-11-25 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101608
* include/bits/ranges_algobase.h (__fill_n_fn): Check for
constant evaluation before using memset.
* testsuite/25_algorithms/fill_n/constrained.cc: Check
byte-sized values as well.
2021-11-25 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-25 Jonathan Wakely <jwakely@redhat.com>
* testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for
debug mode.
* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2021-11-25 Jonathan Wakely <jwakely@redhat.com>
* testsuite/lib/libstdc++.exp: Rename effective target keywords
to avoid dashes in the name.
* testsuite/*: Update effective targe keywords.
2021-11-24 François Dumont <fdumont@gcc.gnu.org>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
* include/std/utility (__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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-21 Jonathan Wakely <jwakely@redhat.com>
* include/bits/alloc_traits.h: Suppress doxygen documentation.
* include/bits/allocated_ptr.h: Likewise.
* include/bits/enable_special_members.h: Likewise.
* include/bits/hashtable.h: Likewise.
* include/bits/hashtable_policy.h: Likewise.
* include/bits/uses_allocator.h: Likewise.
* include/bits/node_handle.h: Document node handles and suppress
documentation for protected members.
* include/std/any: Suppress documentation for implementation
details.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100748
PR libstdc++/103133
* config/os/gnu-linux/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK):
Define for glibc 2.34 and later.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-09 Jonathan Wakely <jwakely@redhat.com>
* testsuite/26_numerics/random/random_device/cons/token.cc:
Print results of random_device_available checks.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-09 Jonathan Wakely <jwakely@redhat.com>
* testsuite/26_numerics/random/random_device/cons/token.cc:
Retry if random devices produce the same value.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/std/optional (nullptr_t): Make constructor noexcept.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102894
* include/std/any (make_any): Add SFINAE constraint.
* testsuite/20_util/any/102894.cc: New test.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in: Update to Doxygen 1.9.2
2021-11-24 Antony Polukhin <antoshkka@gmail.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_function.h (function::function(F)): Add
static assertions to check constructibility requirements.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-18 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_function.h: Improve doxygen comments.
2021-11-24 Tim Adye <Tim.Adye@cern.ch>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-06-25 Jonathan Wakely <jwakely@redhat.com>
* include/std/syncstream (basic_syncbuf::swap()): Remove
noexcept, as per LWG 3498.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-05 Jonathan Wakely <jwakely@redhat.com>
* testsuite/lib/gdb-test.exp: Add target selector support to the
dg-final directives.
* testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for
C++20.
* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
* testsuite/libstdc++-prettyprinters/prettyprinters.exp: Tweak
comment.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100117
* testsuite/17_intro/headers/c++1998/49745.cc: Explicitly list
all C++ headers instead of including <bits/stdc++.h>
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-16 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc:
Fix reads past the end of strings.
* testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc:
Likewise.
* testsuite/experimental/string_view/operations/compare/wchar_t/1.cc:
Likewise.
2021-11-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103086
* testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr
with non-empty pointer and non-empty deleter.
2021-11-23 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103086
* python/libstdcxx/v6/printers.py (_tuple_impl_get): New helper
for accessing the tuple element stored in a _Tuple_impl node.
(tuple_get): New function for accessing a tuple element.
(unique_ptr_get): New function for accessing a unique_ptr.
(UniquePointerPrinter, StdPathPrinter): Use unique_ptr_get.
* python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker): Cast
tuple to its base class before accessing _M_head_impl.
2021-11-23 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103240
* libsupc++/tinfo2.cc (type_info::before): Use unadjusted name
to check for the '*' prefix.
* testsuite/util/testsuite_shared.cc: Add type_info object for
use in new test.
* testsuite/18_support/type_info/103240.cc: New test.
2021-11-23 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103381
* include/ext/bitmap_allocator.h: Include <bits/stl_function.h>
instead of <functional>.
2021-11-23 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-23 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-23 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11-22 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/range_access.h (begin(valarray), end(valarray)):
Add noexcept.
2021-11-01 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-11-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103022
* include/std/valarray (begin, end): Do not dereference an empty
valarray. Add noexcept and [[nodiscard]].
* testsuite/26_numerics/valarray/range_access.cc: Check empty
valarray. Check iterator properties. Run as well as compiling.
* testsuite/26_numerics/valarray/range_access2.cc: Likewise.
* testsuite/26_numerics/valarray/103022.cc: New test.
2021-10-19 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-19 Jonathan Wakely <jwakely@redhat.com>
* doc/Makefile.am (stamp-html-doxygen, stamp-html-doxygen)
(stamp-latex-doxygen, stamp-man-doxygen): Fix recipes for
relative ${top_srcdir}.
* doc/Makefile.in: Regenerate.
2021-10-14 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-13 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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>
Backported from master:
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>
Backported from master:
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-10-13 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-04-28 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100187
PR libstdc++/100237
PR libstdc++/100249
PR libstdc++/100287
* include/bits/ranges_algo.h (__search_n_fn::operator()): Give
the __value_comp lambda an explicit bool return type.
(__is_permutation_fn::operator()): Give the __proj_scan local
variable auto&& return type. Give the __comp_scan lambda an
explicit bool return type.
(__remove_fn::operator()): Give the __pred lambda an explicit
bool return type.
(__partition_fn::operator()): Don't std::move __first twice
when returning an empty subrange.
(__min_fn::operator()): Don't std::move __comp.
(__max_fn::operator()): Likewise.
(__minmax_fn::operator()): Likewise.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-31 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
Try other service if "http" fails.
2021-10-12 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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-28 Jonathan Wakely <jwakely@redhat.com>
* doc/Makefile.am (stamp-pdf-doxygen): Improve comment about
dealing with errors. Use '@' to prevent shell command being
echoed.
* doc/Makefile.in: Regenerate.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-31 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/names.cc: Undefine some more names used
by Solaris system headers.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102048
* include/ext/rope (rope::erase(size_type)): Remove broken
function.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-08-02 Patrick Palka <ppalka@redhat.com>
PR libstdc++/101483
* include/std/ranges (join_view::_Iterator::_Iterator): Add
missing std::move.
2021-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-06-20 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (split_view::_InnerIter::base): Define as
per P2210.
2021-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-06-18 Patrick Palka <ppalka@redhat.com>
* include/std/concepts (convertible_to): Just use declval as per
LWG 3557.
2021-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-10-12 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/tuple/comparison_operators/overloaded.cc:
Restore test for operator<.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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>
Backported from master:
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-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Thomas Rodgers <rodgert@twrodgers.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (advance): Remove non-deducible
template parameter.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-09-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/102280
* include/std/span (span(Range&&)): Add constraint to deduction
guide.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-01 Jonathan Wakely <jwakely@redhat.com>
* testsuite/25_algorithms/is_permutation/2.cc: Include <iterator>.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-10-05 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/integer_comparisons/greater.cc: New test.
2021-10-12 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-19 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101965
* include/std/charconv (__to_chars_i): Remove redundant check.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-17 Jonathan Wakely <jwakely@redhat.com>
* testsuite/26_numerics/random/seed_seq/cons/range.cc: Check
construction from input iterators.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-08-17 Jonathan Wakely <jwakely@redhat.com>
* include/bits/basic_string.h (basic_string::contains): Do not
define for -std=gnu++20.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/semaphore_base.h: Include <exception> and <errno.h>.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-30 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100285
* include/experimental/socket (__basic_socket_impl::set_option)
(__basic_socket_impl::get_option) [!_GLIBCXX_HAVE_SYS_SOCKET_H]:
Just set error code.
* testsuite/experimental/net/socket/socket_base.cc: CHeck
for <sys/socket.h> not <socket.h>.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-30 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100180
PR libstdc++/100286
PR libstdc++/100351
* testsuite/experimental/net/internet/address/v4/comparisons.cc:
Use new effective-target keyword.
* testsuite/experimental/net/internet/address/v4/cons.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/creation.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/members.cc:
Likewise.
* testsuite/experimental/net/internet/address/v6/members.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/base.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/ops/reverse.cc:
Likewise.
* testsuite/experimental/net/internet/socket/opt.cc:
Likewise.
* testsuite/experimental/net/internet/tcp.cc:
Likewise.
* testsuite/experimental/net/internet/udp.cc:
Likewise.
* testsuite/lib/libstdc++.exp (check_effective_target_net_ts_ip):
New proc to check net_ts_ip et.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-27 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/internet (address_v6::bytes_type): Adjust
formatting.
(basic_endpoint): Define _M_is_v6() to put all checks for
AF_INET6 in one place.
(basic_endpoint::resize): Simplify.
(operator==(const tcp&, const tcp&)): Add constexpr and noexcept.
(operator!=(const tcp&, const tcp&)): Likewise.
(operator==(const udp&, const udp&)): Likewise.
(operator!=(const udp&, const udp&)): Likewise.
* testsuite/experimental/net/internet/tcp.cc: New test.
* testsuite/experimental/net/internet/udp.cc: New test.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-27 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100286
* include/experimental/internet (resolver_errc, resolver_category())
(make_error_code, make_error_condition): Define unconditionally,
only make enumerators and use of gai_strerror depend on the
availability of <netdb.h>.
(address_v4::to_string): Use correct constant for string length.
(address_v4::to_string, address_v6::to_string): Define
unconditionally, throw if unsupported.
(make_address_v4, make_address_v6): Define unconditionally.
Return an error if unsupported.
(tcp, udp, v6_only, unicast::hops, multicast::*): Define
conditionally,
* testsuite/experimental/net/internet/socket/opt.cc: Check for
<netinet/in.h> and <netinet/tcp.h> before using types from
namespace net::ip.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-27 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100285
* include/experimental/internet (resolver_base::flags):
Define overloaded operators as hidden friends.
* include/experimental/socket (socket_base::message_flags):
Likewise.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-26 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/internet (tcp::no_delay, v6_only)
(unicast::hops, multicast::hops, multicast::enable_loopback):
Change access of base class and static data members. Add
using-declaration for __socket_crtp::operator=(_Tp).
(multicast::__mcastopt): New type.
(multicast::join_group, multicast::leave_group): Derive from
__mcastopt for common implementation.
* include/experimental/socket: Add comment.
* testsuite/experimental/net/internet/socket/opt.cc: New test.
* testsuite/experimental/net/socket/socket_base.cc: Check for
protected constructor/destructor of socket_base. Check for
explicit constructors of socket option classes.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-26 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/bits/net.h (__socket_base): Add
bool template parameter to allow BooleanSocketOption and
IntegerSocketOption to have different __socket_base<int>
base classes.
(__socket_base<bool>): Adjust base class.
(__socket_base<int>): Add partial specialization.
(__socket_crtp::operator=(_Tp)): Add noexcept-specifier.
* include/experimental/socket (socket_base::broadcast)
(socket_base::debug, socket_base::do_not_route)
(socket_base::keep_alive, socket_base::linger)
(socket_base::out_of_band_inline)
(socket_base::receive_buffer_size)
(socket_base::receive_low_watermark)
(socket_base::reuse_address, socket_base::send_buffer_size)
(socket_base::send_low_watermark): Add using-declaration for
__socket_crtp::operator=(_Tp).
* testsuite/experimental/net/socket/socket_base.cc: Check
properties of socket option types.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-26 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/internet (resolver_base::flags): Remove
enumerators. Initialize constants directly with desired values.
Make all operators constexpr and noexcept.
* testsuite/experimental/net/internet/resolver/base.cc: Use
__gnu_test::test_bitmask_values for bitmask type. Check
construction and destruction is protected.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100180
* include/experimental/io_context (io_context): Define
dummy_pollfd type so that most member functions still compile
without <poll.h> and struct pollfd.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-23 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/io_context (io_context::async_wait): Add
comment.
* include/experimental/socket (basic_socket::async_connect):
Cast wait_type constant to int.
(basic_datagram_socket::async_receive): Likewise.
(basic_datagram_socket::async_receive_from): Likewise.
(basic_datagram_socket::async_send): Likewise.
(basic_datagram_socket::async_send_to): Likewise.
(basic_stream_socket::async_receive): Likewise.
(basic_stream_socket::async_send): Likewise. Use io_context
parameter directly, instead of via an executor.
(basic_socket_acceptor::async_accept): Likewise.
2021-08-24 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-04-23 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/socket (socket_base::shutdown_type):
(socket_base::wait_type, socket_base::message_flags):
Remove enumerators. Initialize constants directly with desired
values.
(socket_base::message_flags): Make all operators constexpr and
noexcept.
* testsuite/util/testsuite_common_types.h (test_bitmask_values):
New test utility.
* testsuite/experimental/net/socket/socket_base.cc: New test.
2021-08-23 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-19 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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>
Backported from master:
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-17 Thomas Schwinge <thomas@codesourcery.com>
Backported from master:
2021-08-17 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose,
continued.
2021-08-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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>
Backported from master:
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-08-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-08-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-08-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-08-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-08-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-07-28 Release Manager
* GCC 11.2.0 released.
2021-07-19 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-07-19 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-07-19 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-16 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-07-15 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-07-15 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-06-30 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/simd: Do not define anything pre-C++17.
2021-07-14 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-07-13 Jonathan Wakely <jwakely@redhat.com>
PR c++/101361
* include/std/string_view (ends_with): Use traits_type::compare
directly.
2021-07-14 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-14 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-13 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-22 Thomas Rodgers <rodgert@appliantology.com>
Backported from master:
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-18 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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>
Backported from master:
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 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
2021-06-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91488
* include/bits/basic_string.h (__cpp_lib_constexpr_string): Only
define C++20 value when std::is_constant_evaluated is available.
* include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
Likewise.
(__constant_string_p, __constant_array_p): Give external
linkage.
* include/std/version (__cpp_lib_constexpr_char_traits)
(__cpp_lib_constexpr_string): Only define C++20 values when
is_constant_evaluated is available.
2021-06-18 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-18 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-14 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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>
Backported from master:
2021-05-20 Jonathan Wakely <jwakely@redhat.com>
* include/bits/random.tcc (__representable_as_double)
(__p1_representable_as_double): Add "" to static asserts.
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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>
Backported from master:
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>
Backported from master:
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>
Backported from master:
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-14 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-06-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-11 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-10 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-10 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-06-03 Patrick Palka <ppalka@redhat.com>
PR libstdc++/100770
* 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-10 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-06-10 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-05-06 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (filter_view::_Iterator::base): Make the
const& overload unconstrained and return a const reference as
per LWG 3533. Make unconditionally noexcept.
(transform_view::_Iterator::base): Likewise.
(elements_view::_Iterator::base): Likewise.
2021-06-10 Patrick Palka <ppalka@redhat.com>
Backported from master:
2021-05-06 Patrick Palka <ppalka@redhat.com>
* include/bits/stl_iterator.h (move_iterator::base): Make the
const& overload unconstrained and return a const reference as
per LWG 3391. Make unconditionally noexcept.
(counted_iterator::base): Likewise.
* testsuite/24_iterators/move_iterator/lwg3391.cc: New test.
* testsuite/24_iterators/move_iterator/move_only.cc: Adjust
has_member_base concept to decay-copy the result of base().
2021-06-10 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-06-10 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-06-10 Patrick Palka <ppalka@redhat.com>
Backported from master:
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-06-09 Thomas Rodgers <rodgert@appliantology.com>
Backported from master:
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-08 Thomas Rodgers <rodgert@appliantology.com>
Backported from master:
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>
Backported from master:
2021-06-08 Thomas Rodgers <rodgert@appliantology.com>
* include/std/barrier (__tree_barrier::_M_arrive): Remove
unnecessary hasher instantiation.
2021-06-07 Avi Kivity <avi@scylladb.com>
Backported from master:
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-02 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-06-02 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-02 Jonathan Wakely <jwakely@redhat.com>
Backported from master:
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-06-02 Jonathan Wakely