Index: polygon_traits.hpp =================================================================== --- polygon_traits.hpp (revision 58861) +++ polygon_traits.hpp (working copy) @@ -35,17 +35,8 @@ } }; - template - struct polygon_traits {}; - template - struct polygon_traits::type, polygon_concept>::type, - typename gtl_same_type::type, polygon_45_concept>::type, - typename gtl_same_type::type, polygon_with_holes_concept>::type, - typename gtl_same_type::type, polygon_45_with_holes_concept>::type - >::type> { + struct polygon_traits_general { typedef typename T::coordinate_type coordinate_type; typedef typename T::iterator_type iterator_type; typedef typename T::point_type point_type; @@ -72,11 +63,7 @@ }; template - struct polygon_traits< T, - typename gtl_or< - typename gtl_same_type::type, polygon_90_concept>::type, - typename gtl_same_type::type, polygon_90_with_holes_concept>::type - >::type > { + struct polygon_traits_90 { typedef typename polygon_90_traits::coordinate_type coordinate_type; typedef iterator_compact_to_points::compact_iterator_type, point_data > iterator_type; typedef point_data point_type; @@ -104,6 +91,61 @@ } }; +#ifndef BOOST_VERY_LITTLE_SFINAE + + template + struct polygon_traits {}; + + template + struct polygon_traits::type, polygon_concept>::type, + typename gtl_same_type::type, polygon_45_concept>::type, + typename gtl_same_type::type, polygon_with_holes_concept>::type, + typename gtl_same_type::type, polygon_45_with_holes_concept>::type + >::type> : public polygon_traits_general {}; + + template + struct polygon_traits< T, + typename gtl_or< + typename gtl_same_type::type, polygon_90_concept>::type, + typename gtl_same_type::type, polygon_90_with_holes_concept>::type + >::type > : public polygon_traits_90 {}; + +#else + + template + struct gtl_ifelse {}; + template + struct gtl_ifelse { + typedef T_ELSE type; + }; + template + struct gtl_ifelse { + typedef T_IF type; + }; + + template + struct polygon_traits {}; + + template + struct polygon_traits::type, polygon_concept>::type, + typename gtl_same_type::type, polygon_45_concept>::type, + typename gtl_same_type::type, polygon_with_holes_concept>::type, + typename gtl_same_type::type, polygon_45_with_holes_concept>::type + >::type, typename gtl_or< + typename gtl_same_type::type, polygon_90_concept>::type, + typename gtl_same_type::type, polygon_90_with_holes_concept>::type + >::type>::type > : public gtl_ifelse::type, polygon_90_concept>::type, + typename gtl_same_type::type, polygon_90_with_holes_concept>::type >::type, + polygon_traits_90, + polygon_traits_general >::type { + }; + +#endif + template struct polygon_with_holes_traits { typedef typename T::iterator_holes_type iterator_holes_type;