pairs.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Boost.Geometry Index
  2. //
  3. // Pairs intended to be used internally in nodes.
  4. //
  5. // Copyright (c) 2011-2023 Adam Wulkiewicz, Lodz, Poland.
  6. //
  7. // Use, modification and distribution is subject to the Boost Software License,
  8. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_PAIRS_HPP
  11. #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_PAIRS_HPP
  12. namespace boost { namespace geometry { namespace index {
  13. namespace detail { namespace rtree {
  14. template <typename First, typename Pointer>
  15. class ptr_pair
  16. {
  17. public:
  18. typedef First first_type;
  19. typedef Pointer second_type;
  20. ptr_pair(First const& f, Pointer s) : first(f), second(s) {}
  21. first_type first;
  22. second_type second;
  23. };
  24. template <typename First, typename Pointer> inline
  25. ptr_pair<First, Pointer> make_ptr_pair(First const& f, Pointer s)
  26. {
  27. return ptr_pair<First, Pointer>(f, s);
  28. }
  29. }} // namespace detail::rtree
  30. }}} // namespace boost::geometry::index
  31. #endif // BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_PAIRS_HPP