https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85270
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=87051
Last reconfirmed|2021-12-28 00:00:00 |2023-3-14
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This breaks std::tuple<> due to new assignment operators in C++23:
https://godbolt.org/z/9EdPrdjhW
#include <type_traits>
template <class...> struct tuple;
template <>
struct tuple<> {
tuple() = default;
~tuple() = default;
tuple(const tuple&) = default;
tuple(tuple&&) = default;
tuple& operator=(const tuple&) = default;
tuple& operator=(tuple&&) = default;
constexpr const tuple& operator=(const tuple&) const noexcept { return
*this; }
constexpr const tuple& operator=(tuple&&) const noexcept { return *this; }
};
static_assert(std::is_trivially_destructible_v<tuple<>>);
static_assert(std::is_trivially_default_constructible_v<tuple<>>);
static_assert(std::is_trivially_copy_constructible_v<tuple<>>);
static_assert(std::is_trivially_move_constructible_v<tuple<>>);
static_assert(std::is_trivially_copy_assignable_v<tuple<>>);
static_assert(std::is_trivially_move_assignable_v<tuple<>>);
static_assert(!std::is_trivially_copyable_v<tuple<>>);
<source>:23:20: error: static assertion failed
23 | static_assert(std::is_trivially_copy_assignable_v<tuple<>>);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<source>:24:20: error: static assertion failed
24 | static_assert(std::is_trivially_move_assignable_v<tuple<>>);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiler returned: 1