On Friday, 8 December 2023 18:51:19 PST Marc Mutz via Development wrote: > After spending countless hours between Ivan and myself fighting GCC's > mysteriously-vanishing <type_traits> support for __int128_t (= qint128), > it turns out that with -ansi/-std=c++NN, not even the most basic of > <type_traits> work: std::is_signed_v<qint128> is _false_! I repeat: _FALSE_.
The issue here is that GCC devs' reading of the standard, as worded, was that they weren't allowed to make an extended integer type return true for those traits because they weren't in the list of types that the standard said it should. Specifically, the question was whether std::is_integral is true. I thought C++23 had clarified that they can, indeed, be integral. But I can't find the change and I can't reproduce it. In fact, it the code seems to still be there, so I must be mis-remembering the conclusion. libstdc++ reacts to the compiler defining __GLIBCXX_TYPE_INT_N_0 to say this is a supported type That macro is defined in c-cppbuiltin.cc[1], which has a !flag_iso check. It's a little difficult to do more investigation right now because Qt Creator keeps crashing as soon as I open type_traits[2]. There's something wrong with the build I made yesterday. [1] https://codebrowser.dev/gcc/gcc/c-family/c-cppbuiltin.cc.html#1224 [2] https://bugreports.qt.io/browse/QTCREATORBUG-30044 -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software Architect - Intel DCAI Cloud Engineering
smime.p7s
Description: S/MIME cryptographic signature
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development