NiHu  2.0
type2tag.hpp
Go to the documentation of this file.
1 
6 #ifndef NIHU_TYPE2TAG_HPP_INCLUDED
7 #define NIHU_TYPE2TAG_HPP_INCLUDED
8 
9 namespace NiHu
10 {
11 
16 template<class Type>
17 struct type2tag
18 {
19  // self-returning metafunction
20  typedef type2tag type;
21 };
22 
27 template <class Tag>
28 struct tag2type;
29 
30 template <class Type>
31 struct tag2type<type2tag<Type> >
32 {
33  typedef Type type;
34 };
35 
36 } // end of namespace NiHu
37 
38 #endif /* NIHU_TYPE2TAG_HPP_INCLUDED */
NiHu::type2tag
Metafunction assigning a tag to a type.
Definition: type2tag.hpp:17
NiHu::tag2type
Metafunction recovering the type from a tag.
Definition: type2tag.hpp:28