Reputation: 35438
I was wondering how the std::is_class
(http://www.cplusplus.com/reference/type_traits/is_class/) is actually implemented. I looked at /usr/include/c++/4.8/tr1/type_traits but it seems that the only thing which is there is:
/// is_class
template<typename _Tp>
struct is_class
: public integral_constant<bool, __is_class(_Tp)>
{ };
and the definition of __is_class
is not to be found anywhere (or I just did not look deep enough). anyway I would be happy if someone could point out to me where to look for this (and also the other is_***
from the std
namespace)
Upvotes: 4
Views: 972
Reputation: 136415
__is_class
is a C++ extension provided by gcc compiler. See gcc type traits.
The C++ front end implements syntactic extensions that allow compile-time determination of various characteristics of a type (or of a pair of types).
Upvotes: 3