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)
6 #ifndef BOOST_MATH_TUPLE_HPP_INCLUDED
7 # define BOOST_MATH_TUPLE_HPP_INCLUDED
8 # include <boost/config.hpp>
10 #include <boost/tr1/detail/config.hpp> // for BOOST_HAS_TR1_TUPLE
12 #ifndef BOOST_NO_CXX11_HDR_TUPLE
16 namespace boost{ namespace math{
20 // [6.1.3.2] Tuple creation functions
22 using ::std::make_tuple;
26 // [6.1.3.3] Tuple helper classes
27 using ::std::tuple_size;
28 using ::std::tuple_element;
32 #elif defined(BOOST_HAS_TR1_TUPLE)
34 #include <boost/tr1/tuple.hpp>
36 namespace boost{ namespace math{
38 using ::std::tr1::tuple;
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;
46 // [6.1.3.3] Tuple helper classes
47 using ::std::tr1::tuple_size;
48 using ::std::tr1::tuple_element;
52 #elif (defined(__BORLANDC__) && (__BORLANDC__ <= 0x600)) || defined(__IBMCPP__)
54 #include <boost/tuple/tuple.hpp>
55 #include <boost/tuple/tuple_comparison.hpp>
56 #include <boost/type_traits/integral_constant.hpp>
58 namespace boost{ namespace math{
62 // [6.1.3.2] Tuple creation functions
63 using ::boost::tuples::ignore;
64 using ::boost::make_tuple;
67 // [6.1.3.3] Tuple helper classes
70 : public ::boost::integral_constant
71 < ::std::size_t, ::boost::tuples::length<T>::value>
74 template < int I, class T>
77 typedef typename boost::tuples::element<I,T>::type type;
80 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
81 // [6.1.3.4] Element access
89 #include <boost/fusion/include/tuple.hpp>
90 #include <boost/fusion/include/std_pair.hpp>
92 namespace boost{ namespace math{
94 using ::boost::fusion::tuple;
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;
102 // [6.1.3.3] Tuple helper classes
103 using ::boost::fusion::tuple_size;
104 using ::boost::fusion::tuple_element;