types: add type_tag helper struct
This commit is contained in:
parent
f9e8ea78bf
commit
29af32106b
12
types.hpp
12
types.hpp
@ -48,4 +48,16 @@ first (T a, Args&& ...b) {
|
||||
return first (std::forward<Args>(b)...);
|
||||
}
|
||||
|
||||
|
||||
namespace util {
|
||||
///------------------------------------------------------------------------
|
||||
/// represents a type as a POD struct (but is statically recoverable via
|
||||
/// the 'type' member).
|
||||
template <typename T>
|
||||
struct type_tag
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user