fix doc example typo
[boost.git] / boost / tr1 / tuple.hpp
blob67ff2a6f27b242392148fcaf28c6ff6f53f317ef
1 // (C) Copyright John Maddock 2005.
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_TR1_TUPLE_HPP_INCLUDED
7 # define BOOST_TR1_TUPLE_HPP_INCLUDED
8 # include <boost/tr1/detail/config.hpp>
10 #ifdef BOOST_HAS_TR1_TUPLE
12 # ifdef BOOST_HAS_INCLUDE_NEXT
13 # include_next BOOST_TR1_HEADER(tuple)
14 # else
15 # include <boost/tr1/detail/config_all.hpp>
16 # include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(tuple))
17 # endif
19 #else
21 #if defined(BOOST_TR1_USE_OLD_TUPLE)
23 #include <boost/tuple/tuple.hpp>
24 #include <boost/tuple/tuple_comparison.hpp>
25 #include <boost/type_traits/integral_constant.hpp>
27 namespace std{ namespace tr1{
29 using ::boost::tuple;
31 // [6.1.3.2] Tuple creation functions
32 using ::boost::tuples::ignore;
33 using ::boost::make_tuple;
34 using ::boost::tie;
36 // [6.1.3.3] Tuple helper classes
37 template <class T>
38 struct tuple_size
39 : public ::boost::integral_constant
40 < ::std::size_t, ::boost::tuples::length<T>::value>
41 {};
43 template < int I, class T>
44 struct tuple_element
46 typedef typename boost::tuples::element<I,T>::type type;
49 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
50 // [6.1.3.4] Element access
51 using ::boost::get;
52 #endif
54 } } // namespaces
56 #else
58 #include <boost/fusion/include/tuple.hpp>
59 #include <boost/fusion/include/std_pair.hpp>
61 namespace std{ namespace tr1{
63 using ::boost::fusion::tuple;
65 // [6.1.3.2] Tuple creation functions
66 using ::boost::fusion::ignore;
67 using ::boost::fusion::make_tuple;
68 using ::boost::fusion::tie;
69 using ::boost::fusion::get;
71 // [6.1.3.3] Tuple helper classes
72 using ::boost::fusion::tuple_size;
73 using ::boost::fusion::tuple_element;
77 #endif
79 #endif
81 #endif