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

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?



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jeff Garrett