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// This file was modified by Oracle on 2020.
8// Modifications copyright (c) 2020 Oracle and/or its affiliates.
9// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10
11// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
12// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
13
14// Use, modification and distribution is subject to the Boost Software License,
15// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
16// http://www.boost.org/LICENSE_1_0.txt)
17
18#ifndef BOOST_GEOMETRY_CORE_TAG_HPP
19#define BOOST_GEOMETRY_CORE_TAG_HPP
20
21
22#include <boost/geometry/core/tags.hpp>
23#include <boost/geometry/util/type_traits_std.hpp>
24
25
26namespace boost { namespace geometry
27{
28
29namespace traits
30{
31
32/*!
33\brief Traits class to attach a tag to a geometry
34\details All geometries should implement a traits::tag<G>::type metafunction to indicate their
35 own geometry type.
36\ingroup traits
37\par Geometries:
38 - all geometries
39\par Specializations should provide:
40 - typedef XXX_tag type; (point_tag, box_tag, ...)
41\tparam Geometry geometry
42*/
43template <typename Geometry, typename Enable = void>
44struct tag
45{
46 typedef void type;
47};
48
49} // namespace traits
50
51
52
53/*!
54\brief \brief_meta{type, tag, \meta_geometry_type}
55\details With Boost.Geometry, tags are the driving force of the tag dispatching
56 mechanism. The tag metafunction is therefore used in every free function.
57\tparam Geometry \tparam_geometry
58\ingroup core
59
60\qbk{[include reference/core/tag.qbk]}
61*/
62template <typename Geometry>
63struct tag
64{
65 typedef typename traits::tag
66 <
67 typename util::remove_cptrref<Geometry>::type
68 >::type type;
69};
70
71}} // namespace boost::geometry
72
73#endif // BOOST_GEOMETRY_CORE_TAG_HPP
74

source code of boost/libs/geometry/include/boost/geometry/core/tag.hpp