• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry (aka GGL, Generic Geometry Library) Point concept unit tests
2 //
3 // Copyright (c) 2008-2016 Bruno Lalande, Paris, France.
4 // Copyright (c) 2007-2016 Barend Gehrels, Amsterdam, the Netherlands.
5 // Copyright (c) 2016 Adam Wulkiewicz, Lodz, Poland.
6 // Use, modification and distribution is subject to the Boost Software License,
7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 
10 #ifndef GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_REQUIRING_A_POINT_HPP
11 #define GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_REQUIRING_A_POINT_HPP
12 
13 #include <boost/geometry/geometries/concepts/point_concept.hpp>
14 
15 namespace bg = boost::geometry;
16 
17 namespace test
18 {
19     template <typename P, typename C>
function_requiring_a_point(P & p1,const C & p2)20     inline void function_requiring_a_point(P& p1, const C& p2)
21     {
22         BOOST_CONCEPT_ASSERT((bg::concepts::Point<P>));
23         BOOST_CONCEPT_ASSERT((bg::concepts::ConstPoint<C>));
24 
25         bg::set<0>(p1, bg::get<0>(p2));
26     }
27 }
28 
29 #endif // GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_REQUIRING_A_POINT_HPP
30