fix doc example typo
[boost.git] / boost / bimap / detail / generate_relation_binder.hpp
blob0ff47621bd9ea524a471b2a99470cc4a08ed944d
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)
9 /// \file detail/generate_relation_binder.hpp
10 /// \brief Define macros to help building the set type of definitions
12 #ifndef BOOST_BIMAP_DETAIL_GENERATE_RELATION_BINDER_HPP
13 #define BOOST_BIMAP_DETAIL_GENERATE_RELATION_BINDER_HPP
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
16 #pragma once
17 #endif
19 #include <boost/config.hpp>
21 #include <boost/mpl/apply.hpp>
23 /*===========================================================================*/
24 #define BOOST_BIMAP_GENERATE_RELATION_BINDER_0CP( \
26 SET_TYPE_OF \
27 ) \
29 template< class Relation > \
30 struct bind_to \
31 { \
32 typedef SET_TYPE_OF<Relation> type; \
35 /*===========================================================================*/
39 /*===========================================================================*/
40 #define BOOST_BIMAP_GENERATE_RELATION_BINDER_1CP( \
42 SET_TYPE_OF, \
43 CP1 \
44 ) \
46 template< class Relation > \
47 struct bind_to \
48 { \
49 typedef SET_TYPE_OF \
50 < \
51 Relation, \
52 BOOST_DEDUCED_TYPENAME mpl::apply<CP1, \
53 BOOST_DEDUCED_TYPENAME Relation::storage_base >::type \
55 > type; \
58 /*===========================================================================*/
62 /*===========================================================================*/
63 #define BOOST_BIMAP_GENERATE_RELATION_BINDER_2CP( \
65 SET_TYPE_OF, \
66 CP1, \
67 CP2 \
68 ) \
70 template< class Relation > \
71 struct bind_to \
72 { \
73 typedef SET_TYPE_OF \
74 < \
75 Relation, \
76 BOOST_DEDUCED_TYPENAME mpl::apply<CP1, \
77 BOOST_DEDUCED_TYPENAME Relation::storage_base >::type, \
78 BOOST_DEDUCED_TYPENAME mpl::apply<CP2, \
79 BOOST_DEDUCED_TYPENAME Relation::storage_base >::type \
81 > type; \
84 /*===========================================================================*/
88 #endif // BOOST_BIMAP_DETAIL_GENERATE_RELATION_BINDER_HPP