Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:38

0001 // Boost.Bimap
0002 //
0003 // Copyright (c) 2006-2007 Matias Capeletto
0004 //
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 /// \file detail/generate_relation_binder.hpp
0010 /// \brief Define macros to help building the set type of definitions
0011 
0012 #ifndef BOOST_BIMAP_DETAIL_GENERATE_RELATION_BINDER_HPP
0013 #define BOOST_BIMAP_DETAIL_GENERATE_RELATION_BINDER_HPP
0014 
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018 
0019 #include <boost/config.hpp>
0020 
0021 #include <boost/mpl/apply.hpp>
0022 
0023 /*===========================================================================*/
0024 #define BOOST_BIMAP_GENERATE_RELATION_BINDER_0CP(                             \
0025                                                                               \
0026         SET_TYPE_OF                                                           \
0027     )                                                                         \
0028                                                                               \
0029     template< class Relation >                                                \
0030     struct bind_to                                                            \
0031     {                                                                         \
0032         typedef SET_TYPE_OF<Relation> type;                                   \
0033                                                                               \
0034     };
0035 /*===========================================================================*/
0036 
0037 
0038 
0039 /*===========================================================================*/
0040 #define BOOST_BIMAP_GENERATE_RELATION_BINDER_1CP(                             \
0041                                                                               \
0042         SET_TYPE_OF,                                                          \
0043         CP1                                                                   \
0044     )                                                                         \
0045                                                                               \
0046     template< class Relation >                                                \
0047     struct bind_to                                                            \
0048     {                                                                         \
0049         typedef SET_TYPE_OF                                                   \
0050         <                                                                     \
0051             Relation,                                                         \
0052             BOOST_DEDUCED_TYPENAME mpl::apply<CP1,                            \
0053                 BOOST_DEDUCED_TYPENAME Relation::storage_base >::type         \
0054                                                                               \
0055         > type;                                                               \
0056                                                                               \
0057     };
0058 /*===========================================================================*/
0059 
0060 
0061 
0062 /*===========================================================================*/
0063 #define BOOST_BIMAP_GENERATE_RELATION_BINDER_2CP(                             \
0064                                                                               \
0065         SET_TYPE_OF,                                                          \
0066         CP1,                                                                  \
0067         CP2                                                                   \
0068     )                                                                         \
0069                                                                               \
0070     template< class Relation >                                                \
0071     struct bind_to                                                            \
0072     {                                                                         \
0073         typedef SET_TYPE_OF                                                   \
0074         <                                                                     \
0075             Relation,                                                         \
0076             BOOST_DEDUCED_TYPENAME mpl::apply<CP1,                            \
0077                 BOOST_DEDUCED_TYPENAME Relation::storage_base >::type,        \
0078             BOOST_DEDUCED_TYPENAME mpl::apply<CP2,                            \
0079                 BOOST_DEDUCED_TYPENAME Relation::storage_base >::type         \
0080                                                                               \
0081         > type;                                                               \
0082                                                                               \
0083     };
0084 /*===========================================================================*/
0085 
0086 
0087 
0088 #endif // BOOST_BIMAP_DETAIL_GENERATE_RELATION_BINDER_HPP