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/overwrite_tagged.hpp
10 /// \brief Hard tagging
12 #ifndef BOOST_BIMAP_TAGS_SUPPORT_OVERWRITE_TAGGED_HPP
13 #define BOOST_BIMAP_TAGS_SUPPORT_OVERWRITE_TAGGED_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::overwrite_tagged
24 \brief Hard tagging metafunction
27 template< class Type, class Tag >
28 struct overwrite_tagged
30 typedef {TaggedType} type;
34 If the type is not tagged, this metafunction returns a tagged type with the
35 passed tag. If it is tagged it returns a new tagged type with the tag replaced
36 by the one passed as a parameter.
38 See also tagged, default_tagged.
41 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
51 template< class Type, class NewTag >
52 struct overwrite_tagged
54 typedef tagged<Type,NewTag> type;
57 template< class Type, class OldTag, class NewTag >
58 struct overwrite_tagged< tagged< Type, OldTag >, NewTag >
60 typedef tagged<Type,NewTag> type;
64 } // namespace support
69 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
71 #endif // BOOST_BIMAP_TAGS_SUPPORT_OVERWRITE_TAGGED_HPP