X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fvariant.h;h=1ad086e70381254422d92330e277b7fd43f4826d;hb=99b9121e2158603372c7313400283b622e6754d8;hp=5109dbcc11811ac8297f71e3903a1eb8c4f36f36;hpb=641a71730a0135fe647f6a230e9704d8b677f2c5;p=libs%2Fcore.git diff --git a/source/core/variant.h b/source/core/variant.h index 5109dbc..1ad086e 100644 --- a/source/core/variant.h +++ b/source/core/variant.h @@ -12,7 +12,7 @@ class type_mismatch: public std::runtime_error { public: type_mismatch(const std::type_info &, const std::type_info &); - ~type_mismatch() throw() { } + virtual ~type_mismatch() throw() = default; }; @@ -50,10 +50,10 @@ private: { return false; } }; - StoreBase *store; + StoreBase *store = 0; public: - Variant(): store(0) { } + Variant() = default; template Variant(const T &v): store(new Store::type>(v)) { } Variant(const Variant &v): store(v.store ? v.store->clone() : 0) { }