diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-01-12 18:41:34 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-01-13 10:36:26 (GMT) |
commit | f3bc816af1b0d61452de973963e453bf3b3f95a2 (patch) | |
tree | e895f8afa3580e6cff6f5ad2017d45bf147a17c2 /3rdParty/Boost/src/boost/phoenix/function/adapt_callable.hpp | |
parent | 188fc285c6555eadd3c9d50ab8a94adcade78d89 (diff) | |
download | swift-f3bc816af1b0d61452de973963e453bf3b3f95a2.zip swift-f3bc816af1b0d61452de973963e453bf3b3f95a2.tar.bz2 |
Adding in the spirit Boost stuff
Change-Id: I4f127ce61667243b64081b0aa309028d5077045f
Diffstat (limited to '3rdParty/Boost/src/boost/phoenix/function/adapt_callable.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/phoenix/function/adapt_callable.hpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/phoenix/function/adapt_callable.hpp b/3rdParty/Boost/src/boost/phoenix/function/adapt_callable.hpp new file mode 100644 index 0000000..8cd8361 --- /dev/null +++ b/3rdParty/Boost/src/boost/phoenix/function/adapt_callable.hpp @@ -0,0 +1,58 @@ +/*============================================================================== + Copyright (c) 2005-2010 Joel de Guzman + Copyright (c) 2011 Thomas Heller + + 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_PHOENIX_FUNCTION_ADAPT_CALLABLE_HPP +#define BOOST_PHOENIX_FUNCTION_ADAPT_CALLABLE_HPP + +#include <boost/phoenix/core/limits.hpp> +#include <boost/phoenix/core/detail/function_eval.hpp> +#include <boost/preprocessor/repetition/repeat.hpp> + +#define BOOST_PHOENIX_ADAPT_CALLABLE_NULLARY(NAME, FUNC) \ + boost::phoenix::detail::expression::function_eval<FUNC>::type const \ + inline NAME() \ + { \ + return boost::phoenix::detail::expression:: \ + function_eval<FUNC>::make(FUNC()); \ + } \ +/**/ + + +#define BOOST_PHOENIX_ADAPT_CALLABLE(NAME, FUNC, N) \ + template <BOOST_PHOENIX_typename_A(N)> \ + typename \ + boost::phoenix::detail::expression::function_eval< \ + FUNC \ + , BOOST_PHOENIX_A(N)>::type const \ + inline NAME(BOOST_PHOENIX_A_const_ref_a(N)) \ + { \ + return boost::phoenix::detail::expression:: \ + function_eval<FUNC, BOOST_PHOENIX_A(N)>:: \ + make(FUNC(), BOOST_PHOENIX_a(N)); \ + } \ +/**/ + + +#define BOOST_PHOENIX_ADAPT_CALLABLE_VARARG(NAME, FUNC) \ + BOOST_PHOENIX_ADAPT_CALLABLE_NULLARY(NAME, FUNC) \ + BOOST_PP_REPEAT_FROM_TO( \ + 1 \ + , BOOST_PHOENIX_LIMIT \ + , BOOST_PHOENIX_ADAPT_CALLABLE_VARARG_R \ + , (NAME, FUNC) \ + ) \ +/**/ + +#define BOOST_PHOENIX_ADAPT_CALLABLE_VARARG_R(Z, N, D) \ + BOOST_PHOENIX_ADAPT_CALLABLE( \ + BOOST_PP_TUPLE_ELEM(2, 0, D) \ + , BOOST_PP_TUPLE_ELEM(2, 1, D) \ + , N \ + ) \ +/**/ + +#endif |