https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116440

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-01-24

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can confirm the following is accepted with -std=c++20 by GCC 13 but not GCC
14 or trunk.  I have no idea whether this is valid C++20 code of course.

#include <any>
#include <tuple>
#include <type_traits>

template <typename T>
using TupleTuple = std::tuple<std::tuple<T>>;

struct EmbedAnyWithZeroSizeArray {
    void* pad[0];
    std::any content;
};

static_assert(std::is_copy_constructible<TupleTuple<EmbedAnyWithZeroSizeArray>>::value);

struct EmbedAny {
    std::any content;
};

static_assert(std::is_copy_constructible<TupleTuple<EmbedAny>>::value);
static_assert(std::is_copy_constructible<TupleTuple<std::any>>::value);

Reply via email to