1 /*============================================================================= 2 Copyright (c) 2001-2011 Joel de Guzman 3 4 Distributed under the Boost Software License, Version 1.0. (See accompanying 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 ==============================================================================*/ 7 #if !defined(BOOST_SPIRIT_LAZY_NOVEMBER_04_2008_1157AM) 8 #define BOOST_SPIRIT_LAZY_NOVEMBER_04_2008_1157AM 9 10 #if defined(_MSC_VER) 11 #pragma once 12 #endif 13 14 #include <boost/spirit/home/support/modify.hpp> 15 #include <boost/spirit/home/support/detail/is_spirit_tag.hpp> 16 #include <boost/proto/traits.hpp> 17 18 namespace boost { namespace phoenix 19 { 20 template <typename Expr> 21 struct actor; 22 }} 23 24 namespace boost { namespace spirit 25 { 26 template <typename Eval> 27 typename proto::terminal<phoenix::actor<Eval> >::type lazy(phoenix::actor<Eval> const & f)28 lazy(phoenix::actor<Eval> const& f) 29 { 30 return proto::terminal<phoenix::actor<Eval> >::type::make(f); 31 } 32 33 namespace tag 34 { 35 struct lazy_eval 36 { 37 BOOST_SPIRIT_IS_TAG() 38 }; 39 } 40 41 template <typename Domain> 42 struct is_modifier_directive<Domain, tag::lazy_eval> 43 : mpl::true_ {}; 44 }} 45 46 #endif 47