/*============================================================================= Copyright (c) 2003 Joel de Guzman Copyright (c) 2004 Peder Holt Use, modification and distribution is subject to 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_SEQUENCE_JOINT_VIEW_HPP) #define FUSION_SEQUENCE_JOINT_VIEW_HPP #include #include #include #include #include #include #include #include namespace boost { namespace fusion { struct joint_view_tag; template struct joint_view; template struct joint_view : sequence_base > { typedef as_fusion_sequence view1_converter; typedef typename view1_converter::type view1; typedef as_fusion_sequence view2_converter; typedef typename view2_converter::type view2; typedef joint_view_tag tag; typedef typename meta::begin::type first_type; typedef typename meta::end::type last_type; typedef typename meta::begin::type concat_type; typedef typename meta::end::type concat_last_type; joint_view(View1& view1, View2& view2); first_type first() const { return boost::fusion::begin(view1_); } concat_type concat() const { return boost::fusion::begin(view2_); } concat_last_type concat_last() const { return boost::fusion::end(view2_); } private: typename boost::mpl::if_c::type view1_; typename boost::mpl::if_c::type view2_; }; template joint_view::joint_view(View1& view1, View2& view2) : view1_(view1), view2_(view2) {} }} #endif