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>
9 # include <boost/detail/workaround.hpp>
11 #if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
15 namespace boost{ namespace math{
19 // [6.1.3.2] Tuple creation functions
21 using ::std::make_tuple;
25 // [6.1.3.3] Tuple helper classes
26 using ::std::tuple_size;
27 using ::std::tuple_element;
31 #elif (defined(__BORLANDC__) && (__BORLANDC__ <= 0x600)) || defined(__IBMCPP__)
33 #include <boost/tuple/tuple.hpp>
34 #include <boost/tuple/tuple_comparison.hpp>
35 #include <boost/type_traits/integral_constant.hpp>
37 namespace boost{ namespace math{
41 // [6.1.3.2] Tuple creation functions
42 using ::boost::tuples::ignore;
43 using ::boost::make_tuple;
46 // [6.1.3.3] Tuple helper classes
49 : public ::boost::integral_constant
50 < ::std::size_t, ::boost::tuples::length<T>::value>
53 template < int I, class T>
56 typedef typename boost::tuples::element<I,T>::type type;
59 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
60 // [6.1.3.4] Element access
68 #include <boost/fusion/include/tuple.hpp>
69 #include <boost/fusion/include/std_pair.hpp>
71 namespace boost{ namespace math{
73 using ::boost::fusion::tuple;
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;
81 // [6.1.3.3] Tuple helper classes
82 using ::boost::fusion::tuple_size;
83 using ::boost::fusion::tuple_element;