From d3484d9b84cedf2373413aea7eed0faf7015c9c5 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 4 Nov 2002 12:34:33 +0000 Subject: [PATCH] Added Borland specific fixes for dropped cv-qualifiers. [SVN r16089] --- include/boost/type_traits/add_pointer.hpp | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/include/boost/type_traits/add_pointer.hpp b/include/boost/type_traits/add_pointer.hpp index 982a584..66f5c5b 100644 --- a/include/boost/type_traits/add_pointer.hpp +++ b/include/boost/type_traits/add_pointer.hpp @@ -19,6 +19,40 @@ namespace boost { namespace detail { +#ifdef __BORLANDC__ +// +// For some reason this implementation stops Borlands compiler +// from dropping cv-qualifiers, it still fails with references +// to arrays for some reason though (shrug...) (JM 20021104) +// +template +struct add_pointer_impl +{ + typedef T* type; +}; +template +struct add_pointer_impl +{ + typedef T* type; +}; +template +struct add_pointer_impl +{ + typedef T* type; +}; +template +struct add_pointer_impl +{ + typedef T* type; +}; +template +struct add_pointer_impl +{ + typedef T* type; +}; + +#else + template struct add_pointer_impl { @@ -26,6 +60,8 @@ struct add_pointer_impl typedef no_ref_type* type; }; +#endif + } // namespace detail BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_pointer,T,typename detail::add_pointer_impl::type)