]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/bimap/include/boost/bimap/tags/support/overwrite_tagged.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / bimap / include / boost / bimap / tags / support / overwrite_tagged.hpp
CommitLineData
7c673cae
FG
1// Boost.Bimap
2//
3// Copyright (c) 2006-2007 Matias Capeletto
4//
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)
8
9/// \file tags/support/overwrite_tagged.hpp
10/// \brief Hard tagging
11
12#ifndef BOOST_BIMAP_TAGS_SUPPORT_OVERWRITE_TAGGED_HPP
13#define BOOST_BIMAP_TAGS_SUPPORT_OVERWRITE_TAGGED_HPP
14
15#if defined(_MSC_VER)
16#pragma once
17#endif
18
19#include <boost/config.hpp>
20
21#include <boost/bimap/tags/tagged.hpp>
22
23/** \struct boost::bimaps::tags::support::overwrite_tagged
24\brief Hard tagging metafunction
25
26\code
27template< class Type, class Tag >
28struct overwrite_tagged
29{
30 typedef {TaggedType} type;
31};
32\endcode
33
34If the type is not tagged, this metafunction returns a tagged type with the
35passed tag. If it is tagged it returns a new tagged type with the tag replaced
36by the one passed as a parameter.
37
38See also tagged, default_tagged.
39 **/
40
41#ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
42
43namespace boost {
44namespace bimaps {
45namespace tags {
46namespace support {
47
48
49// Change the tag
50
51template< class Type, class NewTag >
52struct overwrite_tagged
53{
54 typedef tagged<Type,NewTag> type;
55};
56
57template< class Type, class OldTag, class NewTag >
58struct overwrite_tagged< tagged< Type, OldTag >, NewTag >
59{
60 typedef tagged<Type,NewTag> type;
61};
62
63
64} // namespace support
65} // namespace tags
66} // namespace bimaps
67} // namespace boost
68
69#endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
70
71#endif // BOOST_BIMAP_TAGS_SUPPORT_OVERWRITE_TAGGED_HPP
72
73