From 29af32106b9ee03308a49b5cc5cac9db1039d761 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 20 Apr 2015 17:46:14 +1000 Subject: [PATCH] types: add type_tag helper struct --- types.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types.hpp b/types.hpp index b2c98c77..1af648d4 100644 --- a/types.hpp +++ b/types.hpp @@ -48,4 +48,16 @@ first (T a, Args&& ...b) { return first (std::forward(b)...); } + +namespace util { + ///------------------------------------------------------------------------ + /// represents a type as a POD struct (but is statically recoverable via + /// the 'type' member). + template + struct type_tag + { + typedef T type; + }; +} + #endif