From 33f1c102e3a9ba6fdce54fdc6d448c410f4af83b Mon Sep 17 00:00:00 2001 From: Marian Krivos Date: Sun, 29 Apr 2012 10:37:54 +0000 Subject: [PATCH] added template struct IsConst --- Foundation/include/Poco/MetaProgramming.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Foundation/include/Poco/MetaProgramming.h b/Foundation/include/Poco/MetaProgramming.h index 64e5f8baf..9d2ef5ee9 100644 --- a/Foundation/include/Poco/MetaProgramming.h +++ b/Foundation/include/Poco/MetaProgramming.h @@ -50,7 +50,7 @@ template struct IsReference /// Use this struct to determine if a template type is a reference. { - enum + enum { VALUE = 0 }; @@ -81,7 +81,7 @@ template struct IsConst /// Use this struct to determine if a template type is a const type. { - enum + enum { VALUE = 0 }; @@ -108,6 +108,17 @@ struct IsConst }; +template +struct IsConst + /// Specialization for const char arrays +{ + enum + { + VALUE = 1 + }; +}; + + template struct TypeWrapper /// Use the type wrapper if you want to decouple constness and references from template types.