diff --git a/include/boost/geometry/algorithms/length.hpp b/include/boost/geometry/algorithms/length.hpp index 9febef9c4..a8ce415b0 100644 --- a/include/boost/geometry/algorithms/length.hpp +++ b/include/boost/geometry/algorithms/length.hpp @@ -43,9 +43,10 @@ namespace detail { namespace length { -template +template struct segment_length { + template static inline typename default_length_result::type apply( Segment const& segment, Strategy const& strategy) { @@ -63,11 +64,12 @@ struct segment_length \note for_each could be used here, now that point_type is changed by boost range iterator */ -template +template struct range_length { typedef typename default_length_result::type return_type; + template static inline return_type apply( Range const& range, Strategy const& strategy) { @@ -106,11 +108,12 @@ namespace dispatch { -template +template struct length : detail::calculate_null { typedef typename default_length_result::type return_type; + template static inline return_type apply(Geometry const& geometry, Strategy const& strategy) { return calculate_null::apply(geometry, strategy); @@ -118,18 +121,18 @@ struct length : detail::calculate_null }; -template -struct length - : detail::length::range_length +template +struct length + : detail::length::range_length {}; // RING: length is currently 0; it might be argued that it is the "perimeter" -template -struct length - : detail::length::segment_length +template +struct length + : detail::length::segment_length {}; @@ -164,8 +167,7 @@ inline typename default_length_result::type length( return dispatch::length < typename tag::type, - Geometry, - strategy_type + Geometry >::apply(geometry, strategy_type()); } @@ -195,8 +197,7 @@ inline typename default_length_result::type length( return dispatch::length < typename tag::type, - Geometry, - Strategy + Geometry >::apply(geometry, strategy); }