/*============================================================================= Copyright (c) 2005-2007 Dan Marsden Copyright (c) 2005-2007 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) ==============================================================================*/ #ifndef PHOENIX_STATEMENT_DETAIL_CATCH_COMPOSITE_HPP #define PHOENIX_STATEMENT_DETAIL_CATCH_COMPOSITE_HPP #include #include #include namespace boost { namespace phoenix { namespace detail { struct catch_composite_eval { template struct result : eval_result {}; template static typename result::type eval(const Env& env, Actor& actor) { return actor.eval(env); } }; template struct catch_composite : composite > { catch_composite(const Actor& actor) : composite >(actor) { } typedef Exception exception_type; }; template struct as_catch_actor { typedef catch_composite< Exception, Actor> comp; typedef actor type; }; template inline typename as_catch_actor::type catch_actor(const Actor& actor) { return catch_composite(actor); } } }} #endif