is_comparable.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2014, Oracle and/or its affiliates.
  3. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
  4. // Licensed under the Boost Software License version 1.0.
  5. // http://www.boost.org/users/license.html
  6. #ifndef BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_IS_COMPARABLE_HPP
  7. #define BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_IS_COMPARABLE_HPP
  8. #include <boost/type_traits/is_same.hpp>
  9. #include <boost/geometry/strategies/distance.hpp>
  10. namespace boost { namespace geometry
  11. {
  12. #ifndef DOXYGEN_NO_DETAIL
  13. namespace detail { namespace distance
  14. {
  15. // metafunction to determine is a strategy is comparable or not
  16. template <typename Strategy>
  17. struct is_comparable
  18. : boost::is_same
  19. <
  20. Strategy,
  21. typename strategy::distance::services::comparable_type
  22. <
  23. Strategy
  24. >::type
  25. >
  26. {};
  27. }} // namespace detail::distance
  28. #endif // DOXYGEN_NO_DETAIL
  29. }} // namespace boost::geometry
  30. #endif // BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_IS_COMPARABLE_HPP