diff --git a/include/boost/type_traits/detail/composite_pointer_type.hpp b/include/boost/type_traits/detail/composite_pointer_type.hpp index f3edb5e..ae21e18 100644 --- a/include/boost/type_traits/detail/composite_pointer_type.hpp +++ b/include/boost/type_traits/detail/composite_pointer_type.hpp @@ -124,19 +124,26 @@ public: typedef typename boost::copy_cv::type const, T>::type, U>::type type; }; +//Old compilers like MSVC-7.1 have problems using boost::conditional in +//composite_pointer_type. Partially specializing on has_common_pointee::value +//seems to make their life easier +template::value > +struct composite_pointer_type_dispatch + : common_pointee +{}; + +template +struct composite_pointer_type_dispatch + : composite_pointer_impl +{}; + + } // detail + template struct composite_pointer_type { - //Done in two steps to avoid compilation errors - //in old compilers like MSVC 7.1 - typedef typename boost::conditional< - - detail::has_common_pointee::value, - detail::common_pointee, - detail::composite_pointer_impl - >::type first_type; - typename first_type::type * type; + typedef typename detail::composite_pointer_type_dispatch::type* type; }; } // namespace type_traits_detail