#if !BOOST_PHOENIX_IS_ITERATING #ifndef BOOST_PHOENIX_STATEMENT_DETAIL_CATCH_PUSH_BACK_HPP #define BOOST_PHOENIX_STATEMENT_DETAIL_CATCH_PUSH_BACK_HPP #include #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) #include #else #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/catch_push_back_" BOOST_PHOENIX_LIMIT_STR ".hpp") #endif /*============================================================================== Copyright (c) 2005-2010 Joel de Guzman Copyright (c) 2010 Thomas Heller 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(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 1) #endif #define BOOST_PHOENIX_CATCH_PUSH_BACK_R0(Z, N, DATA) \ BOOST_PP_COMMA_IF(N) \ typename proto::result_of::child_c::type \ /**/ #define BOOST_PHOENIX_CATCH_PUSH_BACK_R1(Z, N, DATA) \ BOOST_PP_COMMA_IF(N) proto::child_c(try_catch) \ /**/ #define BOOST_PHOENIX_ITERATION_PARAMS \ (3, (2, BOOST_PHOENIX_CATCH_LIMIT, \ )) #include BOOST_PHOENIX_ITERATE() #undef BOOST_PHOENIX_CATCH_PUSH_BACK_R0 #undef BOOST_PHOENIX_CATCH_PUSH_BACK_R1 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) #pragma wave option(output: null) #endif #endif // BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES #endif #else template struct catch_push_back { typedef typename proto::result_of::make_expr< phoenix::tag::catch_ , proto::basic_default_domain , catch_exception , Capture , Expr >::type catch_expr; typedef phoenix::expression::try_catch< BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _) , catch_expr> gen_type; typedef typename gen_type::type type; static type make( TryCatch const& try_catch , Capture const& capture , Expr const& catch_ ) { return gen_type::make( BOOST_PP_REPEAT( BOOST_PHOENIX_ITERATION , BOOST_PHOENIX_CATCH_PUSH_BACK_R1 , _ ) , proto::make_expr< phoenix::tag::catch_ , proto::basic_default_domain >(catch_exception(), capture, catch_) ); } }; template struct catch_push_back { typedef typename proto::result_of::make_expr< phoenix::tag::catch_ , proto::basic_default_domain , catch_exception , Expr >::type catch_expr; typedef phoenix::expression::try_catch< BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _) , catch_expr> gen_type; typedef typename gen_type::type type; static type make( TryCatch const& try_catch , Expr const& catch_ ) { return gen_type::make( BOOST_PP_REPEAT( BOOST_PHOENIX_ITERATION , BOOST_PHOENIX_CATCH_PUSH_BACK_R1 , _ ) , proto::make_expr< phoenix::tag::catch_ , proto::basic_default_domain >(catch_exception(), catch_) ); } }; template struct catch_all_push_back { typedef typename proto::result_of::make_expr< phoenix::tag::catch_all , proto::basic_default_domain , Expr >::type catch_expr; typedef phoenix::expression::try_catch< BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_CATCH_PUSH_BACK_R0, _) , catch_expr> gen_type; typedef typename gen_type::type type; static type make( TryCatch const& try_catch , Expr const& catch_ ) { return gen_type::make( BOOST_PP_REPEAT( BOOST_PHOENIX_ITERATION , BOOST_PHOENIX_CATCH_PUSH_BACK_R1 , _ ) , proto::make_expr< phoenix::tag::catch_all , proto::basic_default_domain >(catch_) ); } }; #endif