]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/core/geometry_types.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / core / geometry_types.hpp
CommitLineData
1e59de90
TL
1// Boost.Geometry
2
3// Copyright (c) 2021, Oracle and/or its affiliates.
4
5// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
6
7// Licensed under the Boost Software License version 1.0.
8// http://www.boost.org/users/license.html
9
10#ifndef BOOST_GEOMETRY_CORE_GEOMETRY_TYPES_HPP
11#define BOOST_GEOMETRY_CORE_GEOMETRY_TYPES_HPP
12
13#include <boost/range/value_type.hpp>
14
15#include <boost/geometry/core/static_assert.hpp>
16#include <boost/geometry/core/tag.hpp>
17#include <boost/geometry/core/tags.hpp>
18
19namespace boost { namespace geometry
20{
21
22namespace traits
23{
24
25// DynamicGeometry or GeometryCollection
26template <typename Geometry>
27struct geometry_types;
28
29} // namespace traits
30
31#ifndef DOXYGEN_NO_DISPATCH
32namespace traits_dispatch
33{
34
35template <typename Geometry, typename Tag = typename geometry::tag<Geometry>::type>
36struct geometry_types
37{
38 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
39 "Not implemented for this Geometry type.",
40 Geometry);
41};
42
43// By default treat GeometryCollection as a range of DynamicGeometries
44template <typename Geometry>
45struct geometry_types<Geometry, geometry_collection_tag>
46 : traits::geometry_types<typename boost::range_value<Geometry>::type>
47{};
48
49} // namespace traits_dispatch
50#endif // DOXYGEN_NO_DISPATCH
51
52namespace traits
53{
54
55// DynamicGeometry or GeometryCollection
56template <typename Geometry>
57struct geometry_types
58 : traits_dispatch::geometry_types<Geometry>
59{};
60
61} // namespace traits
62
63}} // namespace boost::geometry
64
65#endif // BOOST_GEOMETRY_CORE_GEOMETRY_TYPES_HPP