summaryrefslogtreecommitdiff
path: root/src/include/rustic.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/rustic.hpp')
-rw-r--r--src/include/rustic.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/include/rustic.hpp b/src/include/rustic.hpp
index 0e46777d..f986a91d 100644
--- a/src/include/rustic.hpp
+++ b/src/include/rustic.hpp
@@ -68,6 +68,16 @@ public:
assert(is_some());
return m_data;
}
+
+ //template<typename U/*, class FcnSome, class FcnNone*/>
+ //U match(::std::function<U(const T&)> if_some, ::Std::function<U()> if_none) const {
+ // if( m_set ) {
+ // return if_some(m_data);
+ // }
+ // else {
+ // return if_none();
+ // }
+ //}
};
template<typename T>
class option<T&>
@@ -87,6 +97,16 @@ public:
assert(is_some());
return *m_ptr;
}
+
+ //template<typename U/*, class FcnSome, class FcnNone*/>
+ //U match(::std::function<U(const T&)> if_some, ::Std::function<U()> if_none) const {
+ // if( m_set ) {
+ // return if_some(*m_ptr);
+ // }
+ // else {
+ // return if_none();
+ // }
+ //}
};
template<typename T>
option<T> Some(T data) {