summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-03-01 20:57:03 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-03-01 21:25:56 (GMT)
commit182dc1c6cbed6ac2bbe297f856650367e0f12ba7 (patch)
treef9f683e6688683eed559f37d2dfa2ed0966a89c1 /3rdParty/Boost/src/boost/tuple/tuple.hpp
parent48389cafdbf211d70fa56f453c6d3b652482a139 (diff)
downloadswift-contrib-182dc1c6cbed6ac2bbe297f856650367e0f12ba7.zip
swift-contrib-182dc1c6cbed6ac2bbe297f856650367e0f12ba7.tar.bz2
Introduce Lua::Value helper.
Diffstat (limited to '3rdParty/Boost/src/boost/tuple/tuple.hpp')
-rw-r--r--3rdParty/Boost/src/boost/tuple/tuple.hpp90
1 files changed, 90 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/tuple/tuple.hpp b/3rdParty/Boost/src/boost/tuple/tuple.hpp
new file mode 100644
index 0000000..7703597
--- /dev/null
+++ b/3rdParty/Boost/src/boost/tuple/tuple.hpp
@@ -0,0 +1,90 @@
+// tuple.hpp - Boost Tuple Library --------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+// -----------------------------------------------------------------
+
+#ifndef BOOST_TUPLE_HPP
+#define BOOST_TUPLE_HPP
+
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730
+// Work around a compiler bug.
+// boost::python::tuple has to be seen by the compiler before the
+// boost::tuple class template.
+namespace boost { namespace python { class tuple; }}
+#endif
+
+#include "boost/config.hpp"
+#include "boost/static_assert.hpp"
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+// The MSVC version
+#include "boost/tuple/detail/tuple_basic_no_partial_spec.hpp"
+
+#else
+// other compilers
+#include "boost/ref.hpp"
+#include "boost/tuple/detail/tuple_basic.hpp"
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace boost {
+
+using tuples::tuple;
+using tuples::make_tuple;
+using tuples::tie;
+#if !defined(BOOST_NO_USING_TEMPLATE)
+using tuples::get;
+#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+//
+// The "using tuples::get" statement causes the
+// Borland compiler to ICE, use forwarding
+// functions instead:
+//
+template<int N, class HT, class TT>
+inline typename tuples::access_traits<
+ typename tuples::element<N, tuples::cons<HT, TT> >::type
+ >::non_const_type
+get(tuples::cons<HT, TT>& c) {
+ return tuples::get<N,HT,TT>(c);
+}
+// get function for const cons-lists, returns a const reference to
+// the element. If the element is a reference, returns the reference
+// as such (that is, can return a non-const reference)
+template<int N, class HT, class TT>
+inline typename tuples::access_traits<
+ typename tuples::element<N, tuples::cons<HT, TT> >::type
+ >::const_type
+get(const tuples::cons<HT, TT>& c) {
+ return tuples::get<N,HT,TT>(c);
+}
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+//
+// MSVC, using declarations don't mix with templates well,
+// so use forwarding functions instead:
+//
+template<int N, typename Head, typename Tail>
+typename tuples::detail::element_ref<N, tuples::cons<Head, Tail> >::RET
+get(tuples::cons<Head, Tail>& t, tuples::detail::workaround_holder<N>* = 0)
+{
+ return tuples::detail::get_class<N>::get(t);
+}
+
+template<int N, typename Head, typename Tail>
+typename tuples::detail::element_const_ref<N, tuples::cons<Head, Tail> >::RET
+get(const tuples::cons<Head, Tail>& t, tuples::detail::workaround_holder<N>* = 0)
+{
+ return tuples::detail::get_class<N>::get(t);
+}
+#endif // BOOST_NO_USING_TEMPLATE
+
+} // end namespace boost
+
+
+#endif // BOOST_TUPLE_HPP