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/manage_bimap_key.hpp
0010 /// \brief Utility class to manage the set types of a bimap.
0011 
0012 #ifndef BOOST_BIMAP_DETAIL_MANAGE_BIMAP_KEY_HPP
0013 #define BOOST_BIMAP_DETAIL_MANAGE_BIMAP_KEY_HPP
0014 
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018 
0019 #include <boost/config.hpp>
0020 
0021 #include <boost/mpl/eval_if.hpp>
0022 #include <boost/mpl/identity.hpp>
0023 
0024 #include <boost/bimap/detail/is_set_type_of.hpp>
0025 
0026 #include <boost/bimap/set_of.hpp>
0027 
0028 namespace boost {
0029 namespace bimaps {
0030 namespace detail {
0031 
0032 /** \struct boost::bimaps::detail::manage_bimap_key
0033 \brief Metafunction to manage the set types of a bimap.
0034 
0035 \code
0036 template< class Type >
0037 struct manage_bimap_key
0038 {
0039     typedef -SetType- type;
0040 }
0041 \endcode
0042 
0043 See also bimap, bimap_core.
0044                                                                                 **/
0045 
0046 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
0047 
0048 template< class Type >
0049 struct manage_bimap_key
0050 {
0051 
0052 typedef BOOST_DEDUCED_TYPENAME
0053 
0054     mpl::eval_if< BOOST_DEDUCED_TYPENAME is_set_type_of< Type >::type,
0055     // {
0056             mpl::identity< Type >,
0057     // }
0058     // else
0059     // {
0060             // Default it to a set
0061             mpl::identity< set_of< Type > >
0062     // }
0063 
0064     >::type set_type;
0065 
0066     // Returns set_type and evaluate the concept_checked_type
0067 
0068     typedef BOOST_DEDUCED_TYPENAME mpl::if_c< true, set_type, 
0069         BOOST_DEDUCED_TYPENAME set_type::lazy_concept_checked::type
0070     >::type type;
0071 };
0072 
0073 
0074 
0075 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
0076 
0077 } // namespace detail
0078 } // namespace bimaps
0079 } // namespace boost
0080 
0081 
0082 #endif // BOOST_BIMAP_DETAIL_MANAGE_BIMAP_KEY_HPP
0083 
0084