Why is std::is_integral<__uint128_t> false with C++20?

Viewed 120

I'm trying to upgrade a legacy application to C++20 and ran into an error that doesn't fail without --std=c++20 on GCC 11.1.0:

static_assert(std::is_integral_v<__uint128_t>, "Error: non-integral type");

Why is it failing only with C++20 and what can I do to fix it?

1 Answers

std::integral_v asks whether the type is one of the built-in or implementation-defined "extended integer types". GCC supports no extended integer types.

Thus, according to the rules, it should be false for standard C++.

The static_assert will compile with -std=gnu++20 which enables a number of non-standard behaviors.

Related