You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/09/01 05:47:11 UTC

[2/3] mesos git commit: Added `is_specialization_of` trait.

Added `is_specialization_of` trait.

This trait can be used to determine if some type `T` is a
specialization of a template type, e.g., if `T` is a specialization of
`Future` or `Try`.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4f208238
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4f208238
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4f208238

Branch: refs/heads/1.3.x
Commit: 4f2082382bf6e53ece6edfe43fd32169c4a509da
Parents: 6fd53dd
Author: Benjamin Hindman <be...@gmail.com>
Authored: Tue Aug 29 23:03:33 2017 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Thu Aug 31 22:39:50 2017 -0700

----------------------------------------------------------------------
 3rdparty/stout/include/stout/traits.hpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4f208238/3rdparty/stout/include/stout/traits.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/traits.hpp b/3rdparty/stout/include/stout/traits.hpp
index 434b8fe..5dea084 100644
--- a/3rdparty/stout/include/stout/traits.hpp
+++ b/3rdparty/stout/include/stout/traits.hpp
@@ -13,6 +13,13 @@
 #ifndef __STOUT_TRAITS_HPP__
 #define __STOUT_TRAITS_HPP__
 
+template <template <typename...> class T, typename U>
+struct is_specialization_of : std::false_type {};
+
+template <template <typename...> class T, typename... Args>
+struct is_specialization_of<T, T<Args...>> : std::true_type {};
+
+
 // Lambda (or functor) traits.
 template <typename T>
 struct LambdaTraits : public LambdaTraits<decltype(&T::operator())> {};