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/generate_index_binder.hpp
10 /// \brief Define macros to help building the set type of definitions
13 #ifndef BOOST_BIMAP_DETAIL_GENERATE_INDEX_BINDER_HPP
14 #define BOOST_BIMAP_DETAIL_GENERATE_INDEX_BINDER_HPP
16 #if defined(_MSC_VER) && (_MSC_VER>=1200)
20 #include <boost/config.hpp>
22 #include <boost/multi_index/tag.hpp>
25 /*===========================================================================*/
26 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_0CP( \
32 template< class KeyExtractor, class Tag > \
35 typedef MULTI_INDEX_TYPE \
37 multi_index::tag< Tag >, \
42 /*===========================================================================*/
46 /*===========================================================================*/
47 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_1CP( \
54 template< class KeyExtractor, class Tag > \
57 typedef MULTI_INDEX_TYPE \
59 multi_index::tag< Tag >, \
65 /*===========================================================================*/
70 /*===========================================================================*/
71 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_2CP( \
78 template< class KeyExtractor, class Tag > \
81 typedef MULTI_INDEX_TYPE \
83 multi_index::tag< Tag >, \
91 /*===========================================================================*/
94 // This is a special registration to allow sequenced and random access indices
95 // to play along smoothly with the other index types.
97 /*===========================================================================*/
98 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_0CP_NO_EXTRACTOR( \
104 template< class KeyExtractor, class Tag > \
107 typedef MULTI_INDEX_TYPE< multi_index::tag< Tag > > type; \
109 /*===========================================================================*/
112 // This is yet another special registration to allow unconstrained sets
113 // to play along smoothly with the other index types.
115 /*===========================================================================*/
116 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_FAKE \
118 template< class KeyExtractor, class Tag > \
123 /*===========================================================================*/
125 #endif // BOOST_BIMAP_DETAIL_GENERATE_INDEX_BINDER_HPP