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 tags/support/value_type_of.hpp
10 /// \brief Consistent way to access the value type of a tagged or untagged type.
12 #ifndef BOOST_BIMAP_TAGS_SUPPORT_VALUE_TYPE_OF_HPP
13 #define BOOST_BIMAP_TAGS_SUPPORT_VALUE_TYPE_OF_HPP
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
19 #include <boost/config.hpp>
21 #include <boost/bimap/tags/tagged.hpp>
23 /** \struct boost::bimaps::tags::support::value_type_of
24 \brief Metafunction to work with tagged and untagged type uniformly
27 template< class Type >
30 typedef {UntaggedType} type;
34 If the type is tagged this metafunction returns Type::value_type, and if it is not
35 tagged it return the same type. This allows to work consistenly with tagged and
38 See also tagged, tag_of.
41 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
50 // value_type_of metafunction
52 template< class Type >
58 template< class Type, class Tag >
59 struct value_type_of< tagged< Type, Tag > >
65 } // namespace support
70 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
72 #endif // BOOST_BIMAP_TAGS_SUPPORT_VALUE_TYPE_OF_HPP