]> git.donarmstrong.com Git - rsem.git/blob - boost/math/tools/tuple.hpp
Updated boost to v1.55.0
[rsem.git] / boost / math / tools / tuple.hpp
1 //  (C) Copyright John Maddock 2010.
2 //  Use, modification and distribution are subject to the
3 //  Boost Software License, Version 1.0. (See accompanying file
4 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef BOOST_MATH_TUPLE_HPP_INCLUDED
7 #  define BOOST_MATH_TUPLE_HPP_INCLUDED
8 #  include <boost/config.hpp>
9
10 #include <boost/tr1/detail/config.hpp>  // for BOOST_HAS_TR1_TUPLE
11
12 #ifndef BOOST_NO_CXX11_HDR_TUPLE
13
14 #include <tuple>
15
16 namespace boost{ namespace math{
17
18 using ::std::tuple;
19
20 // [6.1.3.2] Tuple creation functions
21 using ::std::ignore;
22 using ::std::make_tuple;
23 using ::std::tie;
24 using ::std::get;
25
26 // [6.1.3.3] Tuple helper classes
27 using ::std::tuple_size;
28 using ::std::tuple_element;
29
30 }}
31
32 #elif defined(BOOST_HAS_TR1_TUPLE)
33
34 #include <boost/tr1/tuple.hpp>
35
36 namespace boost{ namespace math{
37
38 using ::std::tr1::tuple;
39
40 // [6.1.3.2] Tuple creation functions
41 using ::std::tr1::ignore;
42 using ::std::tr1::make_tuple;
43 using ::std::tr1::tie;
44 using ::std::tr1::get;
45
46 // [6.1.3.3] Tuple helper classes
47 using ::std::tr1::tuple_size;
48 using ::std::tr1::tuple_element;
49
50 }}
51
52 #elif (defined(__BORLANDC__) && (__BORLANDC__ <= 0x600)) || defined(__IBMCPP__)
53
54 #include <boost/tuple/tuple.hpp>
55 #include <boost/tuple/tuple_comparison.hpp>
56 #include <boost/type_traits/integral_constant.hpp>
57
58 namespace boost{ namespace math{
59
60 using ::boost::tuple;
61
62 // [6.1.3.2] Tuple creation functions
63 using ::boost::tuples::ignore;
64 using ::boost::make_tuple;
65 using ::boost::tie;
66
67 // [6.1.3.3] Tuple helper classes
68 template <class T> 
69 struct tuple_size 
70    : public ::boost::integral_constant
71    < ::std::size_t, ::boost::tuples::length<T>::value>
72 {};
73
74 template < int I, class T>
75 struct tuple_element
76 {
77    typedef typename boost::tuples::element<I,T>::type type;
78 };
79
80 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
81 // [6.1.3.4] Element access
82 using ::boost::get;
83 #endif
84
85 } } // namespaces
86
87 #else
88
89 #include <boost/fusion/include/tuple.hpp>
90 #include <boost/fusion/include/std_pair.hpp>
91
92 namespace boost{ namespace math{
93
94 using ::boost::fusion::tuple;
95
96 // [6.1.3.2] Tuple creation functions
97 using ::boost::fusion::ignore;
98 using ::boost::fusion::make_tuple;
99 using ::boost::fusion::tie;
100 using ::boost::fusion::get;
101
102 // [6.1.3.3] Tuple helper classes
103 using ::boost::fusion::tuple_size;
104 using ::boost::fusion::tuple_element;
105
106 }}
107
108 #endif
109
110 #endif
111
112