]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/concepts/point_without_getter.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
5 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
6 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
8 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
9 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
11 // Use, modification and distribution is subject to the Boost Software License,
12 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
16 #include "function_requiring_a_point.hpp"
18 #include <boost/geometry/core/cs.hpp>
22 point() : x(0), y(0) {} // initialize to suppress warnings
26 namespace boost
{ namespace geometry
{ namespace traits
{
28 template <> struct tag
<point
> { typedef point_tag type
; };
29 template <> struct coordinate_type
<point
> { typedef float type
; };
30 template <> struct coordinate_system
<point
> { typedef bg::cs::cartesian type
; };
31 template <> struct dimension
<point
> { enum { value
= 2 }; };
33 template <> struct access
<point
, 0>
35 static void set(point
& p
, float value
) { p
.x
= value
; }
38 template <> struct access
<point
, 1>
40 static void set(point
& p
, float value
) { p
.y
= value
; }
44 }}} // namespace bg::traits
50 test::function_requiring_a_point(p1
, p2
);