/*============================================================================= Copyright (c) 2005 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_TUPLE_10032005_0810) #define FUSION_TUPLE_10032005_0810 #include #include #include #include #include #include #include #include #include #include namespace boost { namespace fusion { template struct tuple : vector { typedef vector< BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> base_type; tuple() : base_type() {} tuple(tuple const& rhs) : base_type(rhs) {} template tuple(std::pair const& rhs) : base_type(rhs) {} #include template tuple& operator=(T const& rhs) { base_type::operator=(rhs); return *this; } tuple& operator=(tuple const& rhs) { base_type::operator=(rhs); return *this; } template tuple& operator=(std::pair const& rhs) { base_type::operator=(rhs); return *this; } }; template struct tuple_size : result_of::size {}; template struct tuple_element : result_of::value_at_c {}; template inline typename lazy_disable_if< is_const , result_of::at_c >::type get(Tuple& tup) { return at_c(tup); } template inline typename result_of::at_c::type get(Tuple const& tup) { return at_c(tup); } }} #endif