summaryrefslogtreecommitdiff
path: root/src/include/rustic.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-08-25 12:21:41 +0800
committerJohn Hodge <tpg@mutabah.net>2015-08-25 12:21:41 +0800
commitb372cfc36b5be1f73d3d79c399530cffd4ce444a (patch)
tree5d65ba11b0c2d895dbe4197f1b53f2a81b8e046d /src/include/rustic.hpp
parent7156d7d274184a085452a58ee3398d06024112b5 (diff)
downloadmrust-b372cfc36b5be1f73d3d79c399530cffd4ce444a.tar.gz
Compiling once more
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) {