简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM