Chris@16
|
1 // (C) Copyright John Maddock 2005.
|
Chris@16
|
2 // Use, modification and distribution are subject to the
|
Chris@16
|
3 // Boost Software License, Version 1.0. (See accompanying file
|
Chris@16
|
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
5
|
Chris@16
|
6 #ifndef BOOST_TR1_TUPLE_HPP_INCLUDED
|
Chris@16
|
7 # define BOOST_TR1_TUPLE_HPP_INCLUDED
|
Chris@16
|
8 # include <boost/tr1/detail/config.hpp>
|
Chris@16
|
9
|
Chris@16
|
10 #ifdef BOOST_HAS_TR1_TUPLE
|
Chris@16
|
11
|
Chris@16
|
12 # if defined(BOOST_HAS_INCLUDE_NEXT) && !defined(BOOST_TR1_DISABLE_INCLUDE_NEXT)
|
Chris@16
|
13 # include_next BOOST_TR1_HEADER(tuple)
|
Chris@16
|
14 # else
|
Chris@16
|
15 # include <boost/tr1/detail/config_all.hpp>
|
Chris@16
|
16 # include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(tuple))
|
Chris@16
|
17 # endif
|
Chris@16
|
18
|
Chris@16
|
19 #else
|
Chris@16
|
20
|
Chris@16
|
21 #if defined(BOOST_TR1_USE_OLD_TUPLE)
|
Chris@16
|
22
|
Chris@16
|
23 #include <boost/tuple/tuple.hpp>
|
Chris@16
|
24 #include <boost/tuple/tuple_comparison.hpp>
|
Chris@16
|
25 #include <boost/type_traits/integral_constant.hpp>
|
Chris@16
|
26
|
Chris@16
|
27 namespace std{ namespace tr1{
|
Chris@16
|
28
|
Chris@16
|
29 using ::boost::tuple;
|
Chris@16
|
30
|
Chris@16
|
31 // [6.1.3.2] Tuple creation functions
|
Chris@16
|
32 using ::boost::tuples::ignore;
|
Chris@16
|
33 using ::boost::make_tuple;
|
Chris@16
|
34 using ::boost::tie;
|
Chris@16
|
35
|
Chris@16
|
36 // [6.1.3.3] Tuple helper classes
|
Chris@16
|
37 template <class T>
|
Chris@16
|
38 struct tuple_size
|
Chris@16
|
39 : public ::boost::integral_constant
|
Chris@16
|
40 < ::std::size_t, ::boost::tuples::length<T>::value>
|
Chris@16
|
41 {};
|
Chris@16
|
42
|
Chris@16
|
43 template < int I, class T>
|
Chris@16
|
44 struct tuple_element
|
Chris@16
|
45 {
|
Chris@16
|
46 typedef typename boost::tuples::element<I,T>::type type;
|
Chris@16
|
47 };
|
Chris@16
|
48
|
Chris@16
|
49 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
Chris@16
|
50 // [6.1.3.4] Element access
|
Chris@16
|
51 using ::boost::get;
|
Chris@16
|
52 #endif
|
Chris@16
|
53
|
Chris@16
|
54 } } // namespaces
|
Chris@16
|
55
|
Chris@16
|
56 #else
|
Chris@16
|
57
|
Chris@16
|
58 #include <boost/fusion/include/tuple.hpp>
|
Chris@16
|
59 #include <boost/fusion/include/std_pair.hpp>
|
Chris@16
|
60
|
Chris@16
|
61 namespace std{ namespace tr1{
|
Chris@16
|
62
|
Chris@16
|
63 using ::boost::fusion::tuple;
|
Chris@16
|
64
|
Chris@16
|
65 // [6.1.3.2] Tuple creation functions
|
Chris@16
|
66 using ::boost::fusion::ignore;
|
Chris@16
|
67 using ::boost::fusion::make_tuple;
|
Chris@16
|
68 using ::boost::fusion::tie;
|
Chris@16
|
69 using ::boost::fusion::get;
|
Chris@16
|
70
|
Chris@16
|
71 // [6.1.3.3] Tuple helper classes
|
Chris@16
|
72 using ::boost::fusion::tuple_size;
|
Chris@16
|
73 using ::boost::fusion::tuple_element;
|
Chris@16
|
74
|
Chris@16
|
75 }}
|
Chris@16
|
76
|
Chris@16
|
77 #endif
|
Chris@16
|
78
|
Chris@16
|
79 #endif
|
Chris@16
|
80
|
Chris@16
|
81 #endif
|
Chris@16
|
82
|