#ifndef META_HS_EXCEPT_BUILDER_HPP #define META_HS_EXCEPT_BUILDER_HPP // Copyright Abel Sinkovics (abel@sinkovics.hu) 2012. // 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) #include #include #include #include #include #include #include #include #include #include #include #include #include typedef boost::mpl::map<> empty_environment; template struct builder { typedef builder type; template struct import : builder< typename boost::mpl::insert< Env, boost::mpl::pair > >::type > {}; #ifdef IMPORT # error IMPORT already defined #endif #define IMPORT(z, n, unused) \ template < \ class Name, \ template class F \ > \ struct BOOST_PP_CAT(import, n) : \ builder< \ typename boost::mpl::insert< \ Env, \ boost::mpl::pair > > \ >::type \ > \ {}; BOOST_PP_REPEAT_FROM_TO(1, CURRY_MAX_ARGUMENT, IMPORT, ~) #undef IMPORT template struct define : builder< typename boost::mpl::insert< Env, typename boost::mpl::apply_wrap1::type >::type > {}; template struct get : bind::type, Env, Env>::type::type {}; }; #endif