File indexing completed on 2025-01-30 09:48:21
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_MULTI_INDEX_INDEXED_BY_HPP
0010 #define BOOST_MULTI_INDEX_INDEXED_BY_HPP
0011
0012 #if defined(_MSC_VER)
0013 #pragma once
0014 #endif
0015
0016 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
0017 #include <boost/mpl/vector.hpp>
0018 #include <boost/preprocessor/cat.hpp>
0019 #include <boost/preprocessor/control/expr_if.hpp>
0020 #include <boost/preprocessor/repetition/enum.hpp>
0021 #include <boost/preprocessor/repetition/enum_params.hpp>
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 #if !defined(BOOST_MULTI_INDEX_LIMIT_INDEXED_BY_SIZE)
0034 #define BOOST_MULTI_INDEX_LIMIT_INDEXED_BY_SIZE BOOST_MPL_LIMIT_VECTOR_SIZE
0035 #endif
0036
0037 #if BOOST_MULTI_INDEX_LIMIT_INDEXED_BY_SIZE<BOOST_MPL_LIMIT_VECTOR_SIZE
0038 #define BOOST_MULTI_INDEX_INDEXED_BY_SIZE \
0039 BOOST_MULTI_INDEX_LIMIT_INDEXED_BY_SIZE
0040 #else
0041 #define BOOST_MULTI_INDEX_INDEXED_BY_SIZE BOOST_MPL_LIMIT_VECTOR_SIZE
0042 #endif
0043
0044 #define BOOST_MULTI_INDEX_INDEXED_BY_TEMPLATE_PARM(z,n,var) \
0045 typename BOOST_PP_CAT(var,n) BOOST_PP_EXPR_IF(n,=mpl::na)
0046
0047 namespace boost{
0048
0049 namespace multi_index{
0050
0051 template<
0052 BOOST_PP_ENUM(
0053 BOOST_MULTI_INDEX_INDEXED_BY_SIZE,
0054 BOOST_MULTI_INDEX_INDEXED_BY_TEMPLATE_PARM,T)
0055 >
0056 struct indexed_by:
0057 mpl::vector<BOOST_PP_ENUM_PARAMS(BOOST_MULTI_INDEX_INDEXED_BY_SIZE,T)>
0058 {
0059 };
0060
0061 }
0062
0063 }
0064
0065 #undef BOOST_MULTI_INDEX_INDEXED_BY_TEMPLATE_PARM
0066 #undef BOOST_MULTI_INDEX_INDEXED_BY_SIZE
0067
0068 #endif