The tag holder. More...
#include <tagged.hpp>
Public Types | |
typedef Type | value_type |
typedef Tag | tag |
The tag holder.
The idea is to add a level of indirection to the type being tagged. With this class you wrapped a type and apply a tag to it. The only thing to remember is that if you write
Then instead to use directly the tagged type, in order to access it you have to write taggedType::value_type
. The tag can be obtained using taggedType::tag
. The idea is not to use this metadata directly but rather using the metafunctions that are defined in the support namespace. With this metafunctions you can work with tagged and untagged types in a consistent way. For example, the following code is valid:
The are other useful metafunctions there too. See also value_type_of, tag_of, is_tagged, apply_to_value_type.
typedef Tag boost::bimaps::tags::tagged< Type, Tag >::tag |
typedef Type boost::bimaps::tags::tagged< Type, Tag >::value_type |