aboutsummaryrefslogtreecommitdiff
path: root/Maybe.h
diff options
context:
space:
mode:
Diffstat (limited to 'Maybe.h')
-rw-r--r--Maybe.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Maybe.h b/Maybe.h
index df12478..000b32f 100644
--- a/Maybe.h
+++ b/Maybe.h
@@ -11,6 +11,7 @@ class Maybe{
public:
Maybe(void):is_something(false),wr(nullptr){}
Maybe(const T &_v):is_something(true),wr(new t_v_wrapper({_v})){}
+ ~Maybe(void){if(wr)delete wr;}
operator bool() const{return this->is_something;}