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 
0010 /// \file relation/detail/static_access_builder.hpp
0011 /// \brief Define macros to help building metafunctions
0012 
0013 #ifndef BOOST_BIMAP_RELATION_DETAIL_STATIC_ACCESS_BUILDER_HPP
0014 #define BOOST_BIMAP_RELATION_DETAIL_STATIC_ACCESS_BUILDER_HPP
0015 
0016 #if defined(_MSC_VER)
0017 #pragma once
0018 #endif
0019 
0020 #include <boost/config.hpp>
0021 
0022 #include <boost/bimap/relation/support/is_tag_of_member_at.hpp>
0023 #include <boost/bimap/detail/debug/static_error.hpp>
0024 #include <boost/core/enable_if.hpp>
0025 #include <boost/preprocessor/cat.hpp>
0026 
0027 
0028 
0029 /******************************************************************************
0030               BIMAP SYMMETRIC STATIC ACCESS INTERFACE
0031 *******************************************************************************
0032 
0033 template< class Tag, class SYMETRIC_TYPE >
0034 struct NAME
0035 {
0036     -UNDEFINED BODY-;
0037 };
0038 
0039 ******************************************************************************/
0040 
0041 
0042 /*===========================================================================*/
0043 #define BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER(                          \
0044                                                                               \
0045         NAME,                                                                 \
0046         SYMMETRIC_TYPE,                                                       \
0047         LEFT_BODY,                                                            \
0048         RIGHT_BODY                                                            \
0049     )                                                                         \
0050                                                                               \
0051     template                                                                  \
0052     <                                                                         \
0053         class Tag,                                                            \
0054         class SYMMETRIC_TYPE,                                                 \
0055         class Enable = void                                                   \
0056     >                                                                         \
0057     struct NAME                                                               \
0058     {                                                                         \
0059         BOOST_BIMAP_STATIC_ERROR(                                             \
0060             BOOST_PP_CAT(NAME,_FAILURE),                                      \
0061             (SYMMETRIC_TYPE,Tag)                                              \
0062         );                                                                    \
0063     };                                                                        \
0064                                                                               \
0065     template< class Tag, class SYMMETRIC_TYPE >                               \
0066     struct NAME                                                               \
0067     <                                                                         \
0068         Tag, SYMMETRIC_TYPE,                                                  \
0069         BOOST_DEDUCED_TYPENAME enable_if                                      \
0070         <                                                                     \
0071             ::boost::bimaps::relation::support::is_tag_of_member_at_left      \
0072             <                                                                 \
0073                 Tag,                                                          \
0074                 SYMMETRIC_TYPE                                                \
0075             >                                                                 \
0076                                                                               \
0077         >::type                                                               \
0078     >                                                                         \
0079     {                                                                         \
0080         LEFT_BODY;                                                            \
0081     };                                                                        \
0082                                                                               \
0083     template< class Tag, class SYMMETRIC_TYPE >                               \
0084     struct NAME                                                               \
0085     <                                                                         \
0086         Tag, SYMMETRIC_TYPE,                                                  \
0087         BOOST_DEDUCED_TYPENAME enable_if                                      \
0088         <                                                                     \
0089             ::boost::bimaps::relation::support::is_tag_of_member_at_right     \
0090             <                                                                 \
0091                 Tag,                                                          \
0092                 SYMMETRIC_TYPE                                                \
0093             >                                                                 \
0094                                                                               \
0095         >::type                                                               \
0096     >                                                                         \
0097     {                                                                         \
0098         RIGHT_BODY;                                                           \
0099     };
0100 /*===========================================================================*/
0101 
0102 
0103 #endif // BOOST_BIMAP_RELATION_DETAIL_STATIC_ACCES_BUILDER_HPP
0104 
0105