Skip to content

Instantly share code, notes, and snippets.

@vvavrychuk
Last active August 29, 2015 14:03
Show Gist options
  • Save vvavrychuk/aa32b44440a1bcf2cf72 to your computer and use it in GitHub Desktop.
Save vvavrychuk/aa32b44440a1bcf2cf72 to your computer and use it in GitHub Desktop.
diff --git a/Foundation/include/Poco/Any.h b/Foundation/include/Poco/Any.h
index a86abba..749962f 100644
--- a/Foundation/include/Poco/Any.h
+++ b/Foundation/include/Poco/Any.h
@@ -463,6 +463,31 @@ private:
Holder & operator=(const Holder &);
};
+ template <size_t N>
+ class Holder<char[N]>: public ValueHolder
+ {
+ public:
+ Holder(const char* value):
+ _held(value)
+ {
+ }
+
+ virtual const std::type_info& type() const
+ {
+ return typeid(char*);
+ }
+
+ virtual ValueHolder* clone() const
+ {
+ return new Holder(_held);
+ }
+
+ const char* _held;
+
+ private:
+ Holder & operator=(const Holder &);
+ };
+
ValueHolder* content() const
{
return _pHolder;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment