3 // Copyright (c) 2006-2007 Matias Capeletto
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)
9 /// \file detail/concept_tags.hpp
10 /// \brief Bimap tags and concepts
12 #ifndef BOOST_BIMAP_DETAIL_CONCEPT_TAGS_HPP
13 #define BOOST_BIMAP_DETAIL_CONCEPT_TAGS_HPP
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
19 #include <boost/config.hpp>
21 #include <boost/mpl/identity.hpp>
22 #include <boost/mpl/placeholders.hpp>
23 #include <boost/mpl/bool.hpp>
29 /// \brief Tag of {SetType}_of definition classes
31 The {SetType}_of classes are derived from this class so it is easy to construct
32 metafunctions. For example now is easy to create a is_set_type_of metafunction.
35 struct set_type_of_tag {};
37 /// \brief Tag of {SetType}_of_relation defition classes
39 struct set_type_of_relation_tag {};
41 /// \brief Tag of {Side}_based identifiers
43 struct side_based_tag : set_type_of_relation_tag {};
48 /** \struct boost::bimaps::left_based
49 \brief Tag to indicate that the main view will be based on the left side.
51 This is convenient because the multi-index core will be more efficient.
52 If possible use this options or the right based one.
57 /** \struct boost::bimaps::right_based
58 \brief Tag to indicate that the main view will be based on the right side.
60 This is convenient because the multi-index core will be more efficient.
61 If possible use this options or the right based one.
66 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
68 struct left_based : ::boost::bimaps::detail::side_based_tag
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; };
74 typedef mpl::bool_<true> left_mutable_key;
75 typedef mpl::bool_<true> right_mutable_key;
78 struct right_based : ::boost::bimaps::detail::side_based_tag
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; };
84 typedef mpl::bool_<true> left_mutable_key;
85 typedef mpl::bool_<true> right_mutable_key;
88 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
90 typedef mpl::_ _relation;
96 #endif // BOOST_BIMAP_DETAIL_CONCEPT_TAGS_HPP