[Bug c++/125901] Lifting not-yet-instantiated std::vector template gives incorrect result for is_trivially_copyable_type

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 25 19:16:48 GMT 2026


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

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think we're going to have to add complete_type to some eval_ functions, so
that we can look at bits like TYPE_HAS_COPY_CTOR.  I don't think we can put
complete_type into get_reflection, otherwise code like

```
#include <meta>
#include <variant>

using namespace std::meta;

using V0 = std::variant<>;
static_assert (variant_size (^^V0) == 0);
```

breaks.  Note that

```
static_assert(std::variant_size_v<V0> == 0);
```

is fine.

Some define_aggregate tests also break.


More information about the Gcc-bugs mailing list