Chris@16
|
1 // (C) Copyright John Maddock 2010.
|
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_MATH_TUPLE_HPP_INCLUDED
|
Chris@16
|
7 # define BOOST_MATH_TUPLE_HPP_INCLUDED
|
Chris@16
|
8 # include <boost/config.hpp>
|
Chris@16
|
9
|
Chris@16
|
10 #ifndef BOOST_NO_CXX11_HDR_TUPLE
|
Chris@16
|
11
|
Chris@16
|
12 #include <tuple>
|
Chris@16
|
13
|
Chris@16
|
14 namespace boost{ namespace math{
|
Chris@16
|
15
|
Chris@16
|
16 using ::std::tuple;
|
Chris@16
|
17
|
Chris@16
|
18 // [6.1.3.2] Tuple creation functions
|
Chris@16
|
19 using ::std::ignore;
|
Chris@16
|
20 using ::std::make_tuple;
|
Chris@16
|
21 using ::std::tie;
|
Chris@16
|
22 using ::std::get;
|
Chris@16
|
23
|
Chris@16
|
24 // [6.1.3.3] Tuple helper classes
|
Chris@16
|
25 using ::std::tuple_size;
|
Chris@16
|
26 using ::std::tuple_element;
|
Chris@16
|
27
|
Chris@16
|
28 }}
|
Chris@16
|
29
|
Chris@16
|
30 #elif (defined(__BORLANDC__) && (__BORLANDC__ <= 0x600)) || defined(__IBMCPP__)
|
Chris@16
|
31
|
Chris@16
|
32 #include <boost/tuple/tuple.hpp>
|
Chris@16
|
33 #include <boost/tuple/tuple_comparison.hpp>
|
Chris@16
|
34 #include <boost/type_traits/integral_constant.hpp>
|
Chris@16
|
35
|
Chris@16
|
36 namespace boost{ namespace math{
|
Chris@16
|
37
|
Chris@16
|
38 using ::boost::tuple;
|
Chris@16
|
39
|
Chris@16
|
40 // [6.1.3.2] Tuple creation functions
|
Chris@16
|
41 using ::boost::tuples::ignore;
|
Chris@16
|
42 using ::boost::make_tuple;
|
Chris@16
|
43 using ::boost::tie;
|
Chris@16
|
44
|
Chris@16
|
45 // [6.1.3.3] Tuple helper classes
|
Chris@16
|
46 template <class T>
|
Chris@16
|
47 struct tuple_size
|
Chris@16
|
48 : public ::boost::integral_constant
|
Chris@16
|
49 < ::std::size_t, ::boost::tuples::length<T>::value>
|
Chris@16
|
50 {};
|
Chris@16
|
51
|
Chris@16
|
52 template < int I, class T>
|
Chris@16
|
53 struct tuple_element
|
Chris@16
|
54 {
|
Chris@16
|
55 typedef typename boost::tuples::element<I,T>::type type;
|
Chris@16
|
56 };
|
Chris@16
|
57
|
Chris@16
|
58 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
Chris@16
|
59 // [6.1.3.4] Element access
|
Chris@16
|
60 using ::boost::get;
|
Chris@16
|
61 #endif
|
Chris@16
|
62
|
Chris@16
|
63 } } // namespaces
|
Chris@16
|
64
|
Chris@16
|
65 #else
|
Chris@16
|
66
|
Chris@16
|
67 #include <boost/fusion/include/tuple.hpp>
|
Chris@16
|
68 #include <boost/fusion/include/std_pair.hpp>
|
Chris@16
|
69
|
Chris@16
|
70 namespace boost{ namespace math{
|
Chris@16
|
71
|
Chris@16
|
72 using ::boost::fusion::tuple;
|
Chris@16
|
73
|
Chris@16
|
74 // [6.1.3.2] Tuple creation functions
|
Chris@16
|
75 using ::boost::fusion::ignore;
|
Chris@16
|
76 using ::boost::fusion::make_tuple;
|
Chris@16
|
77 using ::boost::fusion::tie;
|
Chris@16
|
78 using ::boost::fusion::get;
|
Chris@16
|
79
|
Chris@16
|
80 // [6.1.3.3] Tuple helper classes
|
Chris@16
|
81 using ::boost::fusion::tuple_size;
|
Chris@16
|
82 using ::boost::fusion::tuple_element;
|
Chris@16
|
83
|
Chris@16
|
84 }}
|
Chris@16
|
85
|
Chris@16
|
86 #endif
|
Chris@16
|
87
|
Chris@16
|
88 #endif
|
Chris@16
|
89
|
Chris@16
|
90
|