![]() |
Home | Libraries | People | FAQ | More |
template <class T>
struct is_object : public true_type-or-false_type {};
Inherits: If T is a (possibly cv-qualified) object type then inherits from true_type, otherwise inherits from false_type. All types are object types except references, void, and function types.
C++ Standard Reference: 3.9p9.
Compiler Compatibility: All current compilers are supported by this trait.
Header: #include
<boost/type_traits/is_object.hpp>
or #include <boost/type_traits.hpp>
Examples:
is_object<int>inherits fromtrue_type.
is_object<int*>::typeis the typetrue_type.
is_object<int (*)(void)>::valueis an integral constant expression that evaluates to true.
is_object<int (MyClass::*)(void)const>::valueis an integral constant expression that evaluates to true.
is_object<int &>::valueis an integral constant expression that evaluates to false: reference types are not objects
is_object<int (double)>::valueis an integral constant expression that evaluates to false: function types are not objects
is_object<const void>::valueis an integral constant expression that evaluates to false: void is not an object type
is_object<T>::value_typeis the typebool.