Re: [PATCH 01/14] c++: Implement __is_integral built-in trait

2024-01-17 Thread Joseph Myers
On Wed, 17 Jan 2024, Jonathan Wakely wrote: > So we can remove the dependency on __STRICT_ISO__ for 128-bit integer > types, and implementing std::is_integral with a built-in seems like > the perfect time to do that. But that seems like stage 1 material, as > we need to go through the library and

Re: [PATCH 01/14] c++: Implement __is_integral built-in trait

2024-01-16 Thread Jonathan Wakely
On Wed, 17 Jan 2024 at 00:31, Jason Merrill wrote: > > On 1/10/24 04:22, Ken Matsui wrote: > > +/* Return true if T is an integral type. With __STRICT_ANSI__, __int128 > > and > > + unsigned __int128 are not integral types. */ > > This really needs a rationale, since they are actually integer

Re: [PATCH 01/14] c++: Implement __is_integral built-in trait

2024-01-16 Thread Jason Merrill
On 1/10/24 04:22, Ken Matsui wrote: +/* Return true if T is an integral type. With __STRICT_ANSI__, __int128 and + unsigned __int128 are not integral types. */ This really needs a rationale, since they are actually integer types. I know __int128 is considered an extension rather than an

[PATCH 01/14] c++: Implement __is_integral built-in trait

2024-01-10 Thread Ken Matsui
This patch implements built-in trait for std::is_integral. gcc/cp/ChangeLog: * cp-trait.def: Define __is_integral. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_INTEGRAL. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise.