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