]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/bimap/include/boost/bimap/detail/concept_tags.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / bimap / include / boost / bimap / detail / concept_tags.hpp
CommitLineData
7c673cae
FG
1// Boost.Bimap
2//
3// Copyright (c) 2006-2007 Matias Capeletto
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8
9/// \file detail/concept_tags.hpp
10/// \brief Bimap tags and concepts
11
12#ifndef BOOST_BIMAP_DETAIL_CONCEPT_TAGS_HPP
13#define BOOST_BIMAP_DETAIL_CONCEPT_TAGS_HPP
14
15#if defined(_MSC_VER)
16#pragma once
17#endif
18
19#include <boost/config.hpp>
20
21#include <boost/mpl/identity.hpp>
22#include <boost/mpl/placeholders.hpp>
23#include <boost/mpl/bool.hpp>
24
25namespace boost {
26namespace bimaps {
27namespace detail {
28
29/// \brief Tag of {SetType}_of definition classes
30/**
31The {SetType}_of classes are derived from this class so it is easy to construct
32metafunctions. For example now is easy to create a is_set_type_of metafunction.
33 **/
34
35struct set_type_of_tag {};
36
37/// \brief Tag of {SetType}_of_relation defition classes
38
39struct set_type_of_relation_tag {};
40
41/// \brief Tag of {Side}_based identifiers
42
43struct side_based_tag : set_type_of_relation_tag {};
44
45} // namespace detail
46
47
48/** \struct boost::bimaps::left_based
49 \brief Tag to indicate that the main view will be based on the left side.
50
51This is convenient because the multi-index core will be more efficient.
52If possible use this options or the right based one.
53
54See also right_based.
55 **/
56
57/** \struct boost::bimaps::right_based
58 \brief Tag to indicate that the main view will be based on the right side.
59
60This is convenient because the multi-index core will be more efficient.
61If possible use this options or the right based one.
62
63See also left_based.
64 **/
65
66#ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
67
68struct left_based : ::boost::bimaps::detail::side_based_tag
69{
70 // I run into troubles if I do not define bind for side based tags.
71 // Maybe a more coherent way of binding the relation can be developped.
72 template< class Relation > struct bind_to { typedef void type; };
73
74 typedef mpl::bool_<true> left_mutable_key;
75 typedef mpl::bool_<true> right_mutable_key;
76};
77
78struct right_based : ::boost::bimaps::detail::side_based_tag
79{
80 // I run into troubles if I do not define bind for side based tags.
81 // Maybe a more coherent way of binding the relation can be developped.
82 template< class Relation > struct bind_to { typedef void type; };
83
84 typedef mpl::bool_<true> left_mutable_key;
85 typedef mpl::bool_<true> right_mutable_key;
86};
87
88#endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
89
90typedef mpl::_ _relation;
91
92} // namespace bimaps
93} // namespace boost
94
95
96#endif // BOOST_BIMAP_DETAIL_CONCEPT_TAGS_HPP
97