]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/doc/src/examples/core/interior_type.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / doc / src / examples / core / interior_type.cpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2// QuickBook Example
3
4// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
5
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//[interior_type
11//`Shows how to use the interior_type metafunction
12
13#include <iostream>
14#include <typeinfo>
15
16#include <boost/geometry.hpp>
17#include <boost/geometry/geometries/polygon.hpp>
18#include <boost/geometry/geometries/ring.hpp>
19#include <boost/geometry/geometries/adapted/boost_array.hpp>
20
21BOOST_GEOMETRY_REGISTER_BOOST_ARRAY_CS(cs::cartesian)
22
23int main()
24{
25 // Define a polygon storing points in a deque and storing interior rings
26 // in a list (note that std::list is not supported by most algorithms
27 // because not supporting a random access iterator)
28 typedef boost::geometry::model::polygon
29 <
30 boost::array<short, 3>,
31 true, true,
32 std::deque, std::list
33 > polygon;
34
35 std::cout << typeid(boost::geometry::interior_type<polygon>::type).name() << std::endl;
36
37 return 0;
38}
39
40//]
41
42//[interior_type_output
43/*`
44Output (using MSVC) is a long story (part manually replaced with ellipsis):
45[pre
46class std::list<class boost::geometry::model::ring<class boost::array<short,3>,1,1,class std::deque,class std::allocator>,class std::allocator<...> > >
47]
48*/
49//]