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 /// \file detail/manage_bimap_key.hpp
10 /// \brief Utility class to manage the set types of a bimap.
12 #ifndef BOOST_BIMAP_DETAIL_MANAGE_BIMAP_KEY_HPP
13 #define BOOST_BIMAP_DETAIL_MANAGE_BIMAP_KEY_HPP
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
19 #include <boost/config.hpp>
21 #include <boost/mpl/eval_if.hpp>
22 #include <boost/mpl/identity.hpp>
24 #include <boost/bimap/detail/is_set_type_of.hpp>
26 #include <boost/bimap/set_of.hpp>
32 /** \struct boost::bimaps::detail::manage_bimap_key
33 \brief Metafunction to manage the set types of a bimap.
36 template< class Type >
37 struct manage_bimap_key
39 typedef -SetType- type;
43 See also bimap, bimap_core.
46 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
48 template< class Type >
49 struct manage_bimap_key
52 typedef BOOST_DEDUCED_TYPENAME
54 mpl::eval_if< BOOST_DEDUCED_TYPENAME is_set_type_of< Type >::type,
56 mpl::identity< Type >,
60 // Default it to a set
61 mpl::identity< set_of< Type > >
66 // Returns set_type and evaluate the concept_checked_type
68 typedef BOOST_DEDUCED_TYPENAME mpl::if_c< true, set_type,
69 BOOST_DEDUCED_TYPENAME set_type::lazy_concept_checked::type
75 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
82 #endif // BOOST_BIMAP_DETAIL_MANAGE_BIMAP_KEY_HPP