Chris@16: // Boost.Bimap Chris@16: // Chris@16: // Copyright (c) 2006-2007 Matias Capeletto Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: /// \file detail/manage_bimap_key.hpp Chris@16: /// \brief Utility class to manage the set types of a bimap. Chris@16: Chris@16: #ifndef BOOST_BIMAP_DETAIL_MANAGE_BIMAP_KEY_HPP Chris@16: #define BOOST_BIMAP_DETAIL_MANAGE_BIMAP_KEY_HPP Chris@16: Chris@101: #if defined(_MSC_VER) Chris@16: #pragma once Chris@16: #endif Chris@16: Chris@16: #include Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: #include Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: namespace bimaps { Chris@16: namespace detail { Chris@16: Chris@16: /** \struct boost::bimaps::detail::manage_bimap_key Chris@16: \brief Metafunction to manage the set types of a bimap. Chris@16: Chris@16: \code Chris@16: template< class Type > Chris@16: struct manage_bimap_key Chris@16: { Chris@16: typedef -SetType- type; Chris@16: } Chris@16: \endcode Chris@16: Chris@16: See also bimap, bimap_core. Chris@16: **/ Chris@16: Chris@16: #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES Chris@16: Chris@16: template< class Type > Chris@16: struct manage_bimap_key Chris@16: { Chris@16: Chris@16: typedef BOOST_DEDUCED_TYPENAME Chris@16: Chris@16: mpl::eval_if< BOOST_DEDUCED_TYPENAME is_set_type_of< Type >::type, Chris@16: // { Chris@16: mpl::identity< Type >, Chris@16: // } Chris@16: // else Chris@16: // { Chris@16: // Default it to a set Chris@16: mpl::identity< set_of< Type > > Chris@16: // } Chris@16: Chris@16: >::type set_type; Chris@16: Chris@16: // Returns set_type and evaluate the concept_checked_type Chris@16: Chris@16: typedef BOOST_DEDUCED_TYPENAME mpl::if_c< true, set_type, Chris@16: BOOST_DEDUCED_TYPENAME set_type::lazy_concept_checked::type Chris@16: >::type type; Chris@16: }; Chris@16: Chris@16: Chris@16: Chris@16: #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES Chris@16: Chris@16: } // namespace detail Chris@16: } // namespace bimaps Chris@16: } // namespace boost Chris@16: Chris@16: Chris@16: #endif // BOOST_BIMAP_DETAIL_MANAGE_BIMAP_KEY_HPP Chris@16: Chris@16: