1 /*============================================================================== 2 Copyright (c) 2001-2010 Joel de Guzman 3 Copyright (c) 2010 Thomas Heller 4 5 Distributed under the Boost Software License, Version 1.0. (See accompanying 6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 ==============================================================================*/ 8 #ifndef BOOST_PHOENIX_OPERATOR_IF_ELSE_HPP 9 #define BOOST_PHOENIX_OPERATOR_IF_ELSE_HPP 10 11 #include <boost/phoenix/core/limits.hpp> 12 #include <boost/phoenix/core/meta_grammar.hpp> 13 #include <boost/phoenix/core/expression.hpp> 14 #include <boost/proto/operators.hpp> 15 16 namespace boost { namespace phoenix 17 { 18 namespace tag 19 { 20 typedef proto::tag::if_else_ if_else_operator; 21 } 22 23 namespace expression 24 { 25 template <typename A0, typename A1, typename A2> 26 struct if_else_operator 27 : expr<tag::if_else_operator, A0, A1, A2> 28 {}; 29 } 30 31 namespace rule 32 { 33 struct if_else_operator 34 : expression::if_else_operator< 35 meta_grammar 36 , meta_grammar 37 , meta_grammar 38 > 39 {}; 40 } 41 42 template <typename Dummy> 43 struct meta_grammar::case_<tag::if_else_operator, Dummy> 44 : enable_rule<rule::if_else_operator, Dummy> 45 {}; 46 47 using proto::if_else; 48 }} 49 50 #endif 51