function_asserting_a_point.hpp 1.0 KB

123456789101112131415161718192021222324252627282930
  1. // Boost.Geometry (aka GGL, Generic Geometry Library) Point concept unit tests
  2. //
  3. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  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 GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_ASSERTING_A_POINT_HPP
  9. #define GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_ASSERTING_A_POINT_HPP
  10. #include <boost/concept/requires.hpp>
  11. #include <boost/geometry/geometries/concepts/point_concept.hpp>
  12. namespace bg = boost::geometry;
  13. namespace test
  14. {
  15. template <typename P, typename CP>
  16. void function_asserting_a_point(P& p1, const CP& p2)
  17. {
  18. BOOST_CONCEPT_ASSERT((bg::concepts::Point<P>));
  19. BOOST_CONCEPT_ASSERT((bg::concepts::ConstPoint<P>));
  20. bg::get<0>(p1) = bg::get<0>(p2);
  21. }
  22. }
  23. #endif // GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_ASSERTING_A_POINT_HPP