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 #ifndef BOOST_BIMAP_DETAIL_CHECK_METADATA_HPP
10 #define BOOST_BIMAP_DETAIL_CHECK_METADATA_HPP
12 #if defined(_MSC_VER) && (_MSC_VER>=1200)
16 #include <boost/config.hpp>
18 #include <boost/mpl/assert.hpp>
19 #include <boost/type_traits/is_same.hpp>
20 #include <boost/preprocessor/cat.hpp>
23 // Easier way to call BOOST_MPL_ASSERT_MSG in class scope
24 /*===========================================================================*/
25 #define BOOST_BIMAP_MPL_ASSERT_MSG_ACS(p1,p2,p3) \
28 BOOST_MPL_ASSERT_MSG(p1,p2,p3); \
29 /*===========================================================================*/
32 // Build a descriptive name.
33 /*===========================================================================*/
34 #define BOOST_BIMAP_WRONG_METADATA_MESSAGE( \
63 /*===========================================================================*/
66 // Check if the metadata have the correct type, and if not inform
67 // it with a useful compile time message.
68 /*===========================================================================*/
69 #define BOOST_BIMAP_CHECK_METADATA( \
77 BOOST_BIMAP_MPL_ASSERT_MSG_ACS \
87 BOOST_BIMAP_WRONG_METADATA_MESSAGE \
93 (P_CLASS::P_NAME,P_CORRECT_TYPE) \
95 /*===========================================================================*/
98 // Just for autodocumment the test code
99 /*===========================================================================*/
100 #define BOOST_BIMAP_TEST_STATIC_FUNCTION(NAME) \
102 /*===========================================================================*/
105 // Just for autodocument the test code
106 /*===========================================================================*/
107 #define BOOST_BIMAP_CALL_TEST_STATIC_FUNCTION(NAME)
108 /*===========================================================================*/
112 #endif // BOOST_BIMAP_DETAIL_CHECK_METADATA_HPP