[/ Copyright 2007 John Maddock. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). ] [section:user_defined User Defined Specializations] Occationally the end user may need to provide their own specialization for one of the type traits - typically where intrinsic compiler support is required to implement a specific trait fully. These specializations should derive from boost::__true_type or boost::__false_type as appropriate: #include #include #include struct my_pod{}; struct my_union { char c; int i; }; namespace boost { template<> struct __is_pod : public __true_type{}; template<> struct __is_pod : public __true_type{}; template<> struct __is_union : public __true_type{}; template<> struct __is_class : public __false_type{}; } [endsect]