Re:You can't make C++ not ugly, but you can't not try (2010)
by MaxBarraclough on Thursday February 27, 2020 @05:34PM
(#22438697)
Many of the type-traits can be implemented without specific compiler support. That's how Boost managed it. Here's their implementation of is_signed if you're curious [0].
I believe some standard-library type-traits cannot be implemented without specific compiler support.
[0] https://github.com/boostorg/type_traits/blob/059ed883/includ...
* various operator new * all the type traits * a lot of the names inherited from the C library
compilers could do much more, but in general they prefer to implement generic optimizations instead of targeting a specific library name (for example removing allocation for stack allocated std::strings was not done until the generic removal of alloc/free was implemented).