2 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
3 // Permission to copy, use, modify, sell and distribute this software is
4 // granted provided this copyright notice appears in all copies. This software
5 // is provided "as is" without express or implied warranty, and with no claim
6 // as to its suitability for any purpose.
8 // See http://www.boost.org for most recent version including documentation.
10 #ifndef BOOST_TT_ADD_POINTER_HPP_INCLUDED
11 #define BOOST_TT_ADD_POINTER_HPP_INCLUDED
13 #include "boost/type_traits/remove_reference.hpp"
15 // should be the last #include
16 #include "boost/type_traits/detail/type_trait_def.hpp"
24 // For some reason this implementation stops Borlands compiler
25 // from dropping cv-qualifiers, it still fails with references
26 // to arrays for some reason though (shrug...) (JM 20021104)
29 struct add_pointer_impl
34 struct add_pointer_impl<T&>
39 struct add_pointer_impl<T&const>
44 struct add_pointer_impl<T&volatile>
49 struct add_pointer_impl<T&const volatile>
57 struct add_pointer_impl
59 typedef typename remove_reference<T>::type no_ref_type;
60 typedef no_ref_type* type;
67 BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_pointer,T,typename detail::add_pointer_impl<T>::type)
71 #include "boost/type_traits/detail/type_trait_undef.hpp"
73 #endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED