diff options
Diffstat (limited to 'cutl/container')
-rw-r--r-- | cutl/container/any.hxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/cutl/container/any.hxx b/cutl/container/any.hxx index 4569b06..9564b2a 100644 --- a/cutl/container/any.hxx +++ b/cutl/container/any.hxx @@ -23,6 +23,10 @@ namespace cutl struct LIBCUTL_EXPORT typing: exception {}; public: + any () + { + } + template <typename X> any (X const& x) : holder_ (new holder_impl<X> (x)) @@ -70,13 +74,25 @@ namespace cutl throw typing (); } - public: std::type_info const& type_info () const { return holder_->type_info (); } + public: + bool + empty () const + { + return holder_.get () == 0; + } + + void + reset () + { + return holder_.reset (); + } + private: class LIBCUTL_EXPORT holder { |