annotate DEPENDENCIES/generic/include/boost/proto/detail/poly_function_funop.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
Chris@16 2
Chris@16 3 #include <boost/proto/detail/preprocessed/poly_function_funop.hpp>
Chris@16 4
Chris@16 5 #elif !defined(BOOST_PP_IS_ITERATING)
Chris@16 6
Chris@16 7 #define BOOST_PROTO_NORMALIZE_ARG(Z, N, DATA) \
Chris@16 8 static_cast<typename normalize_arg<BOOST_PP_CAT(A, N) const &> \
Chris@16 9 ::reference>(BOOST_PP_CAT(a, N)) \
Chris@16 10 /**/
Chris@16 11
Chris@16 12 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
Chris@16 13 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/poly_function_funop.hpp")
Chris@16 14 #endif
Chris@16 15
Chris@16 16 ///////////////////////////////////////////////////////////////////////////////
Chris@16 17 // poly_function_funop.hpp
Chris@16 18 // Contains overloads of poly_function\<\>::operator()
Chris@16 19 //
Chris@16 20 // Copyright 2008 Eric Niebler. Distributed under the Boost
Chris@16 21 // Software License, Version 1.0. (See accompanying file
Chris@16 22 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 23
Chris@16 24 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
Chris@16 25 #pragma wave option(preserve: 1)
Chris@16 26 #endif
Chris@16 27
Chris@16 28 #define BOOST_PP_ITERATION_PARAMS_1 \
Chris@16 29 (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/poly_function_funop.hpp>))
Chris@16 30 #include BOOST_PP_ITERATE()
Chris@16 31
Chris@16 32 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
Chris@16 33 #pragma wave option(output: null)
Chris@16 34 #endif
Chris@16 35
Chris@16 36 #undef BOOST_PROTO_NORMALIZE_ARG
Chris@16 37
Chris@16 38 #else
Chris@16 39
Chris@16 40 #define N BOOST_PP_ITERATION()
Chris@16 41
Chris@16 42 template<typename This BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
Chris@16 43 struct result<This(BOOST_PP_ENUM_PARAMS(N, A))>
Chris@16 44 : Derived::template impl<
Chris@16 45 BOOST_PP_ENUM_BINARY_PARAMS(
Chris@16 46 N
Chris@16 47 , typename normalize_arg<A
Chris@16 48 , >::type BOOST_PP_INTERCEPT
Chris@16 49 )
Chris@16 50 >
Chris@16 51 {
Chris@16 52 typedef typename result::result_type type;
Chris@16 53 };
Chris@16 54
Chris@16 55 template<BOOST_PP_ENUM_PARAMS(N, typename A)>
Chris@16 56 typename result<
Chris@16 57 Derived const(
Chris@16 58 BOOST_PP_ENUM_BINARY_PARAMS(N, A, const & BOOST_PP_INTERCEPT)
Chris@16 59 )
Chris@16 60 >::type
Chris@16 61 operator ()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const &a)) const
Chris@16 62 {
Chris@16 63 result<
Chris@16 64 Derived const(
Chris@16 65 BOOST_PP_ENUM_BINARY_PARAMS(N, A, const & BOOST_PP_INTERCEPT)
Chris@16 66 )
Chris@16 67 > impl;
Chris@16 68
Chris@16 69 return impl(BOOST_PP_ENUM(N, BOOST_PROTO_NORMALIZE_ARG, ~));
Chris@16 70 }
Chris@16 71
Chris@16 72 #undef N
Chris@16 73
Chris@16 74 #endif // BOOST_PROTO_DONT_USE_PREPROCESSED_FILES