is_indexable.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Boost.Geometry Index
  2. //
  3. // Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
  4. //
  5. // Use, modification and distribution is subject to the Boost Software License,
  6. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. #ifndef BOOST_GEOMETRY_INDEX_DETAIL_IS_INDEXABLE_HPP
  9. #define BOOST_GEOMETRY_INDEX_DETAIL_IS_INDEXABLE_HPP
  10. #include <boost/geometry/core/tag.hpp>
  11. #include <boost/geometry/core/tags.hpp>
  12. namespace boost { namespace geometry { namespace index { namespace detail {
  13. template
  14. <
  15. typename Geometry,
  16. typename Tag = typename geometry::tag<Geometry>::type
  17. >
  18. struct is_indexable
  19. {
  20. static const bool value = false;
  21. };
  22. template <typename Point>
  23. struct is_indexable<Point, geometry::point_tag>
  24. {
  25. static const bool value = true;
  26. };
  27. template <typename Box>
  28. struct is_indexable<Box, geometry::box_tag>
  29. {
  30. static const bool value = true;
  31. };
  32. template <typename Segment>
  33. struct is_indexable<Segment, geometry::segment_tag>
  34. {
  35. static const bool value = true;
  36. };
  37. }}}} // namespave boost::geometry::index::detail
  38. #endif // BOOST_GEOMETRY_INDEX_DETAIL_IS_INDEXABLE_HPP