On Sat, 9 Dec 2023 at 18:16, Thiago Macieira <thiago.macie...@intel.com> wrote: > > 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.
It all boils down to intmax_t. Extended int types couldn't be larger than that and be integers, but that restriction was lifted in C, via https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2889.htm, and C++ inherits that fix. -- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development