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

Provided by KDAB

Privacy Policy
Improve your Profiling and Debugging skills
Find out more

source code of include/boost/math/tools/tuple.hpp