diff options
Diffstat (limited to 'boost/geometry/algorithms/detail/is_simple/multipoint.hpp')
-rw-r--r-- | boost/geometry/algorithms/detail/is_simple/multipoint.hpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/boost/geometry/algorithms/detail/is_simple/multipoint.hpp b/boost/geometry/algorithms/detail/is_simple/multipoint.hpp index 61f0bc9130..dfc98041b9 100644 --- a/boost/geometry/algorithms/detail/is_simple/multipoint.hpp +++ b/boost/geometry/algorithms/detail/is_simple/multipoint.hpp @@ -1,6 +1,6 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2014-2017, Oracle and/or its affiliates. +// Copyright (c) 2014-2019, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -42,19 +42,26 @@ struct is_simple_multipoint template <typename Strategy> static inline bool apply(MultiPoint const& multipoint, Strategy const&) { + typedef typename Strategy::cs_tag cs_tag; + typedef geometry::less + < + typename point_type<MultiPoint>::type, + -1, + cs_tag + > less_type; + if (boost::empty(multipoint)) { return true; } MultiPoint mp(multipoint); - std::sort(boost::begin(mp), boost::end(mp), - geometry::less<typename point_type<MultiPoint>::type>()); + std::sort(boost::begin(mp), boost::end(mp), less_type()); simplicity_failure_policy policy; return !detail::is_valid::has_duplicates < - MultiPoint, closed + MultiPoint, closed, cs_tag >::apply(mp, policy); } }; |