// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // 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_REMOVE_POINTER_HPP_INCLUDED #define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED #include #if defined(BOOST_MSVC) #include #include #endif namespace boost { #if BOOST_WORKAROUND(BOOST_MSVC, < 1900) namespace detail{ // // We need all this crazy indirection because a type such as: // // T (*const)(U) // // Does not bind to a or partial specialization with VC10 and earlier // template struct remove_pointer_imp { typedef T type; }; template struct remove_pointer_imp { typedef T type; }; template struct remove_pointer_imp3 { typedef typename remove_pointer_imp::type>::type type; }; template struct remove_pointer_imp3 { typedef T type; }; template struct remove_pointer_imp2 { typedef typename remove_pointer_imp3::value>::type type; }; } template struct remove_pointer{ typedef typename boost::detail::remove_pointer_imp2::type type; }; #else template struct remove_pointer{ typedef T type; }; template struct remove_pointer{ typedef T type; }; template struct remove_pointer{ typedef T type; }; template struct remove_pointer{ typedef T type; }; template struct remove_pointer{ typedef T type; }; #endif #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) template using remove_pointer_t = typename remove_pointer::type; #endif } // namespace boost #endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED