Chris@16: // tuple.hpp - Boost Tuple Library -------------------------------------- Chris@16: Chris@16: // Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See Chris@16: // accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // For more information, see http://www.boost.org Chris@16: Chris@16: // ----------------------------------------------------------------- Chris@16: Chris@16: #ifndef BOOST_TUPLE_HPP Chris@16: #define BOOST_TUPLE_HPP Chris@16: Chris@16: #if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 Chris@16: // Work around a compiler bug. Chris@16: // boost::python::tuple has to be seen by the compiler before the Chris@16: // boost::tuple class template. Chris@16: namespace boost { namespace python { class tuple; }} Chris@16: #endif Chris@16: Chris@16: #include "boost/config.hpp" Chris@16: #include "boost/static_assert.hpp" Chris@16: Chris@16: // other compilers Chris@16: #include "boost/ref.hpp" Chris@16: #include "boost/tuple/detail/tuple_basic.hpp" Chris@16: Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: using tuples::tuple; Chris@16: using tuples::make_tuple; Chris@16: using tuples::tie; Chris@16: #if !defined(BOOST_NO_USING_TEMPLATE) Chris@16: using tuples::get; Chris@101: #else Chris@16: // Chris@16: // The "using tuples::get" statement causes the Chris@16: // Borland compiler to ICE, use forwarding Chris@16: // functions instead: Chris@16: // Chris@16: template Chris@16: inline typename tuples::access_traits< Chris@16: typename tuples::element >::type Chris@16: >::non_const_type Chris@16: get(tuples::cons& c) { Chris@16: return tuples::get(c); Chris@16: } Chris@16: // get function for const cons-lists, returns a const reference to Chris@16: // the element. If the element is a reference, returns the reference Chris@16: // as such (that is, can return a non-const reference) Chris@16: template Chris@16: inline typename tuples::access_traits< Chris@16: typename tuples::element >::type Chris@16: >::const_type Chris@16: get(const tuples::cons& c) { Chris@16: return tuples::get(c); Chris@16: } Chris@16: Chris@16: #endif // BOOST_NO_USING_TEMPLATE Chris@16: Chris@16: } // end namespace boost Chris@16: Chris@16: Chris@16: #endif // BOOST_TUPLE_HPP