/////////////////////////////////////////////////////////////////////////////// /// \file lazy.hpp /// Contains definition of the lazy<> transform. // // Copyright 2008 Eric Niebler. 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 BOOST_PROTO_TRANSFORM_LAZY_HPP_EAN_12_02_2007 #define BOOST_PROTO_TRANSFORM_LAZY_HPP_EAN_12_02_2007 #include #include #include #include #include #include #include #include namespace boost { namespace proto { /// \brief A PrimitiveTransform that uses make\<\> to build /// a CallableTransform, and then uses call\<\> to apply it. /// /// lazy\<\> is useful as a higher-order transform, when the /// transform to be applied depends on the current state of the /// transformation. The invocation of the make\<\> transform /// evaluates any nested transforms, and the resulting type is treated /// as a CallableTransform, which is evaluated with call\<\>. template struct lazy : transform > { template struct impl : call< typename make::template impl::result_type >::template impl {}; }; /// INTERNAL ONLY template struct lazy > : lazy {}; #include /// INTERNAL ONLY /// template struct is_callable > : mpl::true_ {}; }} #endif