is_comparable.hpp 1.1 KB

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