/*============================================================================= Copyright (c) 2001-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_DO_WHILE_HPP #define PHOENIX_STATEMENT_DO_WHILE_HPP #include #include namespace boost { namespace phoenix { struct do_while_eval { template struct result { typedef void type; }; template static void eval(Env const& env, Cond& cond, Do& do_) { do do_.eval(env); while (cond.eval(env)); } }; template struct do_while_gen { do_while_gen(Do const& do_) : do_(do_) {} template actor::type> while_(Cond const& cond) const { return compose(cond, do_); } Do do_; }; struct do_gen { template do_while_gen operator[](Do const& do_) const { return do_while_gen(do_); } }; do_gen const do_ = do_gen(); }} #endif