/*-----------------------------------------------------------------------------+ Copyright (c) 2008-2009: Joachim Faulhaber +------------------------------------------------------------------------------+ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENCE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +-----------------------------------------------------------------------------*/ #ifndef BOOST_ICL_TYPE_TRAITS_REP_TYPE_OF_HPP_JOFA_110329 #define BOOST_ICL_TYPE_TRAITS_REP_TYPE_OF_HPP_JOFA_110329 #include // For macro BOOST_STATIC_CONSTANT #include #include #include #include #include #include namespace boost{ namespace icl { namespace detail { BOOST_MPL_HAS_XXX_TRAIT_DEF(rep) } //-------------------------------------------------------------------------- template struct has_rep_type : mpl::bool_::value> {}; template struct represents // Rep represents Type; Type is_wrapper_of Rep : mpl::bool_::value> { typedef represents type; BOOST_STATIC_CONSTANT(bool, value = (mpl::and_< has_rep_type , boost::is_same >::value) ); }; //-------------------------------------------------------------------------- template struct get_rep_type; template struct get_rep_type { typedef no_type type; }; template struct get_rep_type { typedef typename Type::rep type; }; //-------------------------------------------------------------------------- template struct rep_type_of { typedef typename get_rep_type::value>::type type; }; }} // namespace boost icl #endif