You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/02/11 09:41:39 UTC
mesos git commit: Constrain `Option`'s forwarding constructor to
constructible types.
Repository: mesos
Updated Branches:
refs/heads/master e84405800 -> 28917d657
Constrain `Option`'s forwarding constructor to constructible types.
Review: https://reviews.apache.org/r/43434/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/28917d65
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/28917d65
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/28917d65
Branch: refs/heads/master
Commit: 28917d657a69ee4731375ba54fe67d13816198ff
Parents: e844058
Author: Joseph Wu <jo...@mesosphere.io>
Authored: Wed Feb 10 16:56:35 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Thu Feb 11 00:18:57 2016 -0800
----------------------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/28917d65/3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp
index 6b66bce..0ff6a85 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp
@@ -40,7 +40,10 @@ public:
Option(T&& _t) : state(SOME), t(std::move(_t)) {}
- template <typename U>
+ template <
+ typename U,
+ typename = typename std::enable_if<
+ std::is_constructible<T, const U&>::value>::type>
Option(const U& u) : state(SOME), t(u) {}
Option(const None&) : state(NONE) {}