]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/include/boost/geometry/core/tag.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / core / tag.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
3// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
5// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
6
7// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
8// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
9
10// Use, modification and distribution is subject to the Boost Software License,
11// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
12// http://www.boost.org/LICENSE_1_0.txt)
13
14#ifndef BOOST_GEOMETRY_CORE_TAG_HPP
15#define BOOST_GEOMETRY_CORE_TAG_HPP
16
17
18#include <boost/geometry/core/tags.hpp>
19#include <boost/geometry/util/bare_type.hpp>
20
21
22namespace boost { namespace geometry
23{
24
25namespace traits
26{
27
28/*!
29\brief Traits class to attach a tag to a geometry
30\details All geometries should implement a traits::tag<G>::type metafunction to indicate their
31 own geometry type.
32\ingroup traits
33\par Geometries:
34 - all geometries
35\par Specializations should provide:
36 - typedef XXX_tag type; (point_tag, box_tag, ...)
37\tparam Geometry geometry
38*/
39template <typename Geometry, typename Enable = void>
40struct tag
41{
42 typedef void type;
43};
44
45} // namespace traits
46
47
48
49/*!
50\brief \brief_meta{type, tag, \meta_geometry_type}
51\details With Boost.Geometry, tags are the driving force of the tag dispatching
52 mechanism. The tag metafunction is therefore used in every free function.
53\tparam Geometry \tparam_geometry
54\ingroup core
55
56\qbk{[include reference/core/tag.qbk]}
57*/
58template <typename Geometry>
59struct tag
60{
61 typedef typename traits::tag
62 <
63 typename geometry::util::bare_type<Geometry>::type
64 >::type type;
65};
66
67}} // namespace boost::geometry
68
69#endif // BOOST_GEOMETRY_CORE_TAG_HPP