// (C) Copyright John Maddock & Thorsten Ottosen 2005. // Use, modification and distribution are subject to 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). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_DECAY_HPP_INCLUDED #define BOOST_TT_DECAY_HPP_INCLUDED #include #include #include #include #include #include #include #include namespace boost { template< class T > struct decay { private: typedef BOOST_DEDUCED_TYPENAME remove_reference::type Ty; public: typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< is_array, mpl::identity::type*>, BOOST_DEDUCED_TYPENAME mpl::eval_if< is_function, add_pointer, mpl::identity > >::type type; }; } // namespace boost #endif // BOOST_TT_DECAY_HPP_INCLUDED