Repository: mesos
Updated Branches:
  refs/heads/master 8bfc4d471 -> 4c6985e63


Included std::tuple or boost::tuples::tuple within a tuples namespace of stout.

Namespace pull-in of std::tuple or boost::tuples::tuple, depending on
the availability of C+11. The results are part of a tuples namespace
of stout.

Example usage including fully qualified namespaces:

tuples::make_tuple(42, true); int foo = tuples::get<0>(tuple);

Review: https://reviews.apache.org/r/18360


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

Branch: refs/heads/master
Commit: 4c6985e6368f56ca0b07058129a3fe685183dee7
Parents: 8bfc4d4
Author: Till Toenshoff <[email protected]>
Authored: Wed Mar 5 13:31:26 2014 -0800
Committer: Niklas Q. Nielsen <[email protected]>
Committed: Wed Mar 5 13:31:26 2014 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/stout/Makefile.am  |  1 +
 .../3rdparty/stout/include/stout/tuple.hpp      | 37 ++++++++++++++++++++
 2 files changed, 38 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4c6985e6/3rdparty/libprocess/3rdparty/stout/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/Makefile.am 
b/3rdparty/libprocess/3rdparty/stout/Makefile.am
index d5c9c68..b1d60ae 100644
--- a/3rdparty/libprocess/3rdparty/stout/Makefile.am
+++ b/3rdparty/libprocess/3rdparty/stout/Makefile.am
@@ -63,6 +63,7 @@ EXTRA_DIST =                                  \
   include/stout/strings.hpp                    \
   include/stout/thread.hpp                     \
   include/stout/try.hpp                                \
+  include/stout/tuple.hpp                      \
   include/stout/unreachable.hpp                        \
   include/stout/utils.hpp                      \
   include/stout/uuid.hpp                       \

http://git-wip-us.apache.org/repos/asf/mesos/blob/4c6985e6/3rdparty/libprocess/3rdparty/stout/include/stout/tuple.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/tuple.hpp 
b/3rdparty/libprocess/3rdparty/stout/include/stout/tuple.hpp
new file mode 100644
index 0000000..469c159
--- /dev/null
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/tuple.hpp
@@ -0,0 +1,37 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __STOUT_TUPLE_HPP__
+#define __STOUT_TUPLE_HPP__
+
+#if __cplusplus >= 201103L
+#include <tuple>
+#else
+#include <boost/tuple/tuple.hpp>
+#endif // __cplusplus >= 201103L
+
+namespace tuples {
+
+#if __cplusplus >= 201103L
+using std::tuple;
+using std::make_tuple;
+using std::get;
+#else // __cplusplus >= 201103L
+using boost::tuples::tuple;
+using boost::tuples::make_tuple;
+using boost::get;
+#endif // __cplusplus >= 201103L
+
+} // namespace tuples
+
+#endif // __STOUT_TUPLE_HPP__

Reply via email to