这篇教程C++ BOOST_PP_INC函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中BOOST_PP_INC函数的典型用法代码示例。如果您正苦于以下问题:C++ BOOST_PP_INC函数的具体用法?C++ BOOST_PP_INC怎么用?C++ BOOST_PP_INC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了BOOST_PP_INC函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: defined {};#else#if !defined(BOOST_DISPATCH_DONT_USE_PREPROCESSED_FILES)#include <boost/dispatch/functor/meta/preprocessed/call.hpp>#else#if defined(__WAVE__) && defined(BOOST_DISPATCH_CREATE_PREPROCESSED_FILES) && __INCLUDE_LEVEL__ == 0#pragma wave option(preserve: 2, line: 0, output: "preprocessed/call.hpp")#endif#define M0(z,n,t) /template<class Tag, BOOST_PP_ENUM_PARAMS(n,class A), class Site> /struct call<Tag(BOOST_PP_ENUM_PARAMS(n,A)),Site> /: meta::result_of<functor<Tag, typename mpl::eval_if< is_same<Site, void>, default_site<Tag>, mpl::identity<Site> >::type>(BOOST_PP_ENUM_PARAMS(n,A))> /{}; //**/ BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_INC(BOOST_DISPATCH_MAX_ARITY),M0,~)#undef M0#if defined(__WAVE__) && defined(BOOST_DISPATCH_CREATE_PREPROCESSED_FILES)#pragma wave option(output: null)#endif#endif#endif} } }#endif
开发者ID:Quanteek,项目名称:nt2,代码行数:29,
示例2: BOOST_PP_REPEAT_FROM_TO{ BOOST_PP_REPEAT_FROM_TO ( 1 , BOOST_PP_INC(BOOST_PP_MIN ( BOOST_DISPATCH_MAX_ARITY , BOOST_PROTO_MAX_ARITY ) ) ,M5,~ ) template<class Func,class Dummy> struct implement<Func(tag::ast_),tag::formal_,Dummy> { template<class Sig> struct result; BOOST_PP_REPEAT_FROM_TO ( 1 , BOOST_PP_INC(BOOST_PP_MIN ( BOOST_DISPATCH_MAX_ARITY , BOOST_PROTO_MAX_ARITY ) ) ,M0,~ ) };} } }#undef M0#undef M1#undef M2#undef M3#undef M4#undef M5#if defined(__WAVE__) && defined(BOOST_DISPATCH_CREATE_PREPROCESSED_FILES)#pragma wave option(output: null)
开发者ID:KWMalik,项目名称:nt2,代码行数:32,
示例3: sign_t typedef typename boost::function_traits<S>::result_type type; }; typedef void * arg1_type; typedef typename boost::function_traits<S>::arg1_type real_context; sign_t(const F & f) : f_(f) {} typename boost::function_traits<S>::result_type operator()(void * context) const { return f_(downcast<real_context>(context)); } BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(CALC_SIGN_MAX_ARITY), CALC_SIGN_PRIVATE_REDIRECT, _ )private: template<class T> static typename boost::enable_if<boost::is_same<T, void*>, T&>::type downcast(void *& context) { return context; } template<class T> static typename boost::enable_if<boost::mpl::and_<boost::is_pointer<T>, boost::mpl::not_<boost::is_same<T, void*> > >, T>::type downcast(void * context) { return static_cast<T>(context); }
开发者ID:go4and,项目名称:lib,代码行数:31,
示例4: tie { tie(this); }#if defined(GENERATING_DOCUMENTATION) /// Establish a connection to an endpoint corresponding to a resolver query. /** * This constructor automatically establishes a connection based on the * supplied resolver query parameters. The arguments are used to construct * a resolver query object. */ template <typename T1, ..., typename TN> explicit basic_socket_iostream(T1 t1, ..., TN tn);#else BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY), BOOST_ASIO_PRIVATE_CTR_DEF, _ )#endif#if defined(GENERATING_DOCUMENTATION) /// Establish a connection to an endpoint corresponding to a resolver query. /** * This function automatically establishes a connection based on the supplied * resolver query parameters. The arguments are used to construct a resolver * query object. */ template <typename T1, ..., typename TN> void connect(T1 t1, ..., TN tn);#else BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY),
开发者ID:TheMatthew,项目名称:wcsaga,代码行数:31,
示例5: BOOST_PP_ITERATION// Copyright (C) 2004 Arkadiy Vertleyb// 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 <boost/typeof/encode_decode_params.hpp>#define n BOOST_PP_ITERATION()// function pointerstemplate<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>struct encode_type_impl<V, R(*)(BOOST_PP_ENUM_PARAMS(n, P))>{ typedef R BOOST_PP_CAT(P, n); typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_PTR_ID + n) type;};template<class Iter>struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>{ typedef Iter iter0; BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n)) typedef BOOST_PP_CAT(p, n)(*type)(BOOST_PP_ENUM_PARAMS(n, p)); typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;};#ifndef BOOST_TYPEOF_NO_FUNCTION_TYPES // function references template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
开发者ID:919858271,项目名称:code,代码行数:31,
示例6: function_equal_ return / function_equal_()( / proto::child_c<0>(e1) / , proto::child_c<0>(e2) / ) / BOOST_PP_REPEAT_FROM_TO( / 1 / , N / , BOOST_PHOENIX_FUNCTION_EQUAL_R / , _ / ); / } / /**/ BOOST_PP_REPEAT_FROM_TO( 1 , BOOST_PP_INC(BOOST_PROTO_MAX_ARITY) , BOOST_PHOENIX_FUNCTION_EQUAL , _ ) #undef BOOST_PHOENIX_FUNCTION_EQUAL_R #undef BOOST_PHOENIX_FUNCTION_EQUAL#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)#pragma wave option(output: null)#endif#endif#endif
开发者ID:InvisibleCRM,项目名称:boostcpp,代码行数:29,
示例7: serialize } // // boost::tuple // template<typename Archive> void serialize( Archive& ar, boost::tuple<>&, unsigned int const ) {} template<typename Archive, typename T1> void serialize( Archive& ar, boost::tuple<T1>& t, unsigned int const ) { ar & boost::serialization::make_nvp("head", t.head); } BOOST_PP_REPEAT_FROM_TO( 2, BOOST_PP_INC(SPRIG_SERIALIZATION_BOOST_TUPLE_ARGS_MAX), SPRIG_SERIALIZATION_BOOST_TUPLE_SERIALIZE_GEN, BOOST_PP_EMPTY() );SPRIG_SERIALIZATION_NAMESPACE_END#endif // #ifndef SPRIG_SERIALIZATION_BOOST_DETAIL_TUPLE_HEAD_TAIL_HPP
开发者ID:bolero-MURAKAMI,项目名称:Sprig,代码行数:30,
示例8: operator and end recursive call of EachFunctor */ / typedef typename boost::mpl::if_< isEnd, / EmptyFunctor, / TmpNextCall>::type NextCall; / / PMACC_NO_NVCC_HDWARNING / HDINLINE void operator()() const / { / FunctorType()(); / NextCall()(); / } / /* N=PMACC_MAX_FUNCTOR_OPERATOR_PARAMS / * template<typename T0, ... , typename TN> / * create operator()(const T0 t0,...,const TN tN) / */ / BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(PMACC_MAX_FUNCTOR_OPERATOR_PARAMS), / PMACC_FOREACH_OPERATOR_CONST, _) /}; /*end of struct ForEach*///########################### end preprocessor definitions #####################/* N = PMACC_MAX_FUNCTOR_TEMPLATES * create: * struct definitions ForEach<Accessor,itBegin,itEnd,T0,...,TN>{} * /see PMACC_FOREACH_STRUCT */BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(PMACC_MAX_FUNCTOR_TEMPLATES), PMACC_FOREACH_STRUCT, _)/* delete all preprocessor defines to avoid conflicts in other files */#undef PMACC_FOREACH_STRUCT
开发者ID:CodeLemon,项目名称:picongpu,代码行数:31,
示例9: BOOST_PP_REPEATBOOST_PP_REPEAT(N_ARG, T_KEY, nil)#define T_VAL(z, n, text) struct val##n { /void test() { printf("val %d/n", n); } /};BOOST_PP_REPEAT(N_ARG, T_VAL, nil)#define T_MAP_PAIR(z, n, text) x11::pair<key##n, val##n>#define T_MAP(z, n, text) typedef x11::map< /BOOST_PP_ENUM_ ## z(n, T_MAP_PAIR, nil) /> map##n##_t;BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(N_ARG), T_MAP, nil)template <typename T, typename Enable = void>struct x_pack;#define T_HAS_KEY(z, n, text) x11::has_key<T, key##n>#define T_X_TYPE(z, n, text) typename x11::at<T, key##n>::type a##n;#define T_X_TEST(z, n, text) a##n.test();#define T_PACK(z, n, text) template <typename T> /struct x_pack<T, typename std::enable_if< / x11::and_< / x11::equal_to<x11::size<T>, x11::long_<n>>, / BOOST_PP_ENUM_ ## z(n, T_HAS_KEY, nil) /
开发者ID:krzysztof-jusiak,项目名称:boost,代码行数:30,
示例10: BOOST_PP_ITERATION_DEPTH#else // BOOST_PP_IS_ITERATING#if BOOST_PP_ITERATION_DEPTH() == 1# define i_ BOOST_PP_FRAME_ITERATION(1)template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) >struct BOOST_PP_CAT(apply,i_) : BOOST_PP_CAT(apply_wrap,i_)< typename lambda<F>::type AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >{ BOOST_MPL_AUX_LAMBDA_SUPPORT( BOOST_PP_INC(i_) , BOOST_PP_CAT(apply,i_) , (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T)) )};#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY/// primary template (not a specialization!)template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) >struct apply : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >
开发者ID:AllenWangxiao,项目名称:darkforce,代码行数:31,
示例11: base_from_member// Helper to initialize a base object so a derived class can use this// object in the initialization of another base class. Used by// Dietmar Kuehl from ideas by Ron Klatcho to solve the problem of a// base class needing to be initialized by a member.// Contributed by Daryle Walkertemplate < typename MemberType, int UniqueID = 0 >class base_from_member{protected: MemberType member; base_from_member() : member() {} BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY), BOOST_PRIVATE_CTR_DEF, _ )}; // boost::base_from_member} // namespace boost// Undo any private macros#undef BOOST_PRIVATE_CTR_DEF#endif // BOOST_UTILITY_BASE_FROM_MEMBER_HPP
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:30,
示例12: BOOST_PP_REPEAT typedef of_size_<BOOST_PP_ENUM(n, M1, n)> result_type; / / template<int N, class Dummy = void> / struct impl {}; / / BOOST_PP_REPEAT(BOOST_PP_INC(n), M3, n) / / BOOST_FORCEINLINE result_type / operator()(Shape const&, Sizes const& s, Bases const& b, Children const& children) const / { / return impl<result_type::static_size>::call(s, b, children); / } / }; / /**/ BOOST_PP_REPEAT_FROM_TO(2, BOOST_PP_INC(NT2_MAX_DIMENSIONS), M0, ~) #undef M0 #undef M1 #undef M2 #undef M3 #undef M4 #undef M5 template< class Domain , class Shape, class Sizes, class Bases , class Children > struct make_size<1, Domain, Shape, Sizes, Bases, Children> { typedef typename boost::proto::result_of::child_c<Children&, 0>::value_type::extent_type idx0_sz; static const std::size_t shape_min = Shape::static_size > 2u ? 2u : Shape::static_size;
开发者ID:JanVogelgesang,项目名称:nt2,代码行数:31,
示例13: defined#include <boost/preprocessor/repetition/repeat_from_to.hpp>#endifnamespace nt2 { namespace meta{ template<class Tag> struct validate { template<class Sig> struct result; #if defined(BOOST_HAS_VARIADIC_TMPL) template<class This, class... Args> struct result<This(Args...)> : std::tr1::result_of<typename functors::functor<Tag>::validate(Args...)> {}; #else #define M0(z,n,t) / template<class This, BOOST_PP_ENUM_PARAMS(n,class A)> / struct result<This(BOOST_PP_ENUM_PARAMS(n,A))> / : std::tr1::result_of<typename functors::functor<Tag> / ::validate(BOOST_PP_ENUM_PARAMS(n,A)) / > / {}; / /**/ BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_INC(NT2_MAX_ARITY),M0,~) #undef M0 #endif };} }#endif
开发者ID:Mathieu-,项目名称:nt2,代码行数:30,
示例14: BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP#include <boost/preprocessor/inc.hpp>#include <boost/preprocessor/dec.hpp>#include <boost/preprocessor/if.hpp>#include <boost/preprocessor/arithmetic/add.hpp>#include <boost/preprocessor/iteration/iterate.hpp>#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()#ifndef BOOST_TYPEOF_LIMIT_FUNCTION_ARITY#define BOOST_TYPEOF_LIMIT_FUNCTION_ARITY 10#endifenum { FUN_ID = BOOST_TYPEOF_UNIQUE_ID(), FUN_PTR_ID = FUN_ID + 1 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), FUN_REF_ID = FUN_ID + 2 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), MEM_FUN_ID = FUN_ID + 3 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), CONST_MEM_FUN_ID = FUN_ID + 4 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), VOLATILE_MEM_FUN_ID = FUN_ID + 5 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), VOLATILE_CONST_MEM_FUN_ID = FUN_ID + 6 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), FUN_VAR_ID = FUN_ID + 7 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), FUN_VAR_PTR_ID = FUN_ID + 8 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), FUN_VAR_REF_ID = FUN_ID + 9 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), MEM_FUN_VAR_ID = FUN_ID + 10 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), CONST_MEM_FUN_VAR_ID = FUN_ID + 11 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), VOLATILE_MEM_FUN_VAR_ID = FUN_ID + 12 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY), VOLATILE_CONST_MEM_FUN_VAR_ID = FUN_ID + 13 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY)};BOOST_TYPEOF_BEGIN_ENCODE_NS
开发者ID:111304037,项目名称:FreeJudger,代码行数:31,
示例15: defined#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template <typename... T> basic_socket_streambuf<Protocol, StreamSocketService, Time, TimeTraits, TimerService>* connect(T... x) { init_buffers(); this->basic_socket<Protocol, StreamSocketService>::close(ec_); typedef typename Protocol::resolver resolver_type; typedef typename resolver_type::query resolver_query; resolver_query query(x...); resolve_and_connect(query); return !ec_ ? this : 0; }#else BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY), BOOST_ASIO_PRIVATE_CONNECT_DEF, _ )#endif /// Close the connection. /** * @return /c this if a connection was successfully established, a null * pointer otherwise. */ basic_socket_streambuf<Protocol, StreamSocketService, Time, TimeTraits, TimerService>* close() { sync(); this->basic_socket<Protocol, StreamSocketService>::close(ec_); if (!ec_) init_buffers();
开发者ID:AlVar009,项目名称:bootil,代码行数:31,
示例16: NT2_DECLTYPE NT2_DECLTYPE( dispatching ( Tag(), Site() / , BOOST_PP_ENUM(n,M0,~) / , adl_helper() / ) / , type ); /}; //**/namespace nt2 { namespace meta{ //============================================================================== // dispatch_call finds the proper call overload for evaluating a given // functor over a set of types on a given site //============================================================================== template<class Sig, class Site> struct dispatch_call; BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_INC(NT2_MAX_ARITY),NT2_DISPATCH_CALL,~)} }#undef M0#undef NT2_DISPATCH_TYPES_TPL#undef NT2_DISPATCH_TYPES#undef NT2_DISPATCH_CALL#if defined(__WAVE__) && defined(NT2_CREATE_PREPROCESSED_FILES)#pragma wave option(output: null)#endif#endif#endif
开发者ID:francescog,项目名称:nt2,代码行数:30,
示例17: BOOST_PP_REPEAT , (typename meta::hierarchy_of<Site>::type()) / BOOST_PP_REPEAT(n,M0,~) / , adl_helper() / ) / ) type; /}; //**/namespace boost { namespace dispatch { namespace meta{ //============================================================================== // dispatch_call finds the proper call overload for evaluating a given // functor over a set of types on a given site //============================================================================== template<class Sig, class Site> struct dispatch_call; BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_DISPATCH_MAX_ARITY),BOOST_DISPATCH_DISPATCH_CALL,~)} } }#undef M0#undef BOOST_DISPATCH_DISPATCH_TYPES_TPL#undef BOOST_DISPATCH_DISPATCH_TYPES#undef BOOST_DISPATCH_DISPATCH_CALL#if defined(__WAVE__) && defined(BOOST_DISPATCH_CREATE_PREPROCESSED_FILES)#pragma wave option(output: null)#endif#endif#endif
开发者ID:faldah,项目名称:nt2,代码行数:30,
示例18: MACRO_3#include <cradle/preprocessor/config.hpp>#include <cradle/preprocessor/va/for_each_i.hpp>#include <boost/preprocessor/cat.hpp>#include <boost/preprocessor/arithmetic/inc.hpp>#include <boost/preprocessor/arithmetic/add.hpp>#include <boost/preprocessor/comparison/equal.hpp>#include <boost/preprocessor/repetition/enum.hpp>#include <boost/preprocessor/repetition/repeat_from_to.hpp>#include <boost/preprocessor/debug/assert.hpp>#define MACRO_3(R, SIZE, I, ELEM) /BOOST_PP_ASSERT(BOOST_PP_EQUAL(BOOST_PP_INC(BOOST_PP_ADD(I, ELEM)), SIZE)) / /**/#define MACRO_2(SIZE, ...) /CRADLE_PP_VA_FOR_EACH_I(MACRO_3, SIZE, __VA_ARGS__) / /**/#define MACRO_1(Z, I, DATA) I#define MACRO_0(Z, I, DATA) /MACRO_2( / I, / CRADLE_PP_VA_REVERSE(BOOST_PP_CAT(BOOST_PP_ENUM_, Z)(I, MACRO_1, _))) / /**/BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(CRADLE_PP_LIMIT_VA), MACRO_0, _)
开发者ID:Cryolite,项目名称:cradle,代码行数:29,
示例19: valmin /// @overload template<typename... Args> details::unspecified valmin(Args const&... dims); /// @overload template<typename ClassName> ClassName::type valmin(ClassName const& classname); /// @overload double valmin(); #else #define M0(z,n,t) / NT2_FUNCTION_IMPLEMENTATION(nt2::tag::Valmin,valmin, n) / /**/ BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_INC(BOOST_PP_INC(NT2_MAX_DIMENSIONS)),M0,~) #undef M0 #endif}namespace nt2 { namespace ext{ /// INTERNAL ONLY template<typename Domain, typename Expr, int N> struct value_type<tag::Valmin,Domain,N,Expr> : meta::generative_value<Expr> {}; /// INTERNAL ONLY
开发者ID:JanVogelgesang,项目名称:nt2,代码行数:31,
示例20: BOOST_PP_ITERATION#else #define N BOOST_PP_ITERATION() #define M0(z,n,txt) (A##n) #define M1(z,n,txt) (unspecified_<A##n>) #define M2(z,n,txt) nt2::run(boost::proto::child_c<BOOST_PP_INC(n)>(a0),p,t) NT2_FUNCTOR_IMPLEMENTATION( nt2::tag::sub2ind_, tag::cpu_ , (SZ)BOOST_PP_REPEAT(N,M0,~) , ((ast_<SZ,nt2::container::domain>)) BOOST_PP_REPEAT(N,M1,~) ) { BOOST_DISPATCH_RETURNS( BOOST_PP_INC(N) , ( SZ const& sz , BOOST_PP_ENUM_BINARY_PARAMS(N,A, const& a) ) , ( nt2::sub2ind( nt2::as_size(sz) , BOOST_PP_ENUM_PARAMS(N,a) ) ) ) }; NT2_FUNCTOR_IMPLEMENTATION( nt2::tag::run_, tag::cpu_ , (A0)(State)(Data) , ((node_ < A0, nt2::tag::sub2ind_ , boost::mpl::long_<BOOST_PP_INC(N)> , nt2::container::domain
开发者ID:atyuwen,项目名称:nt2,代码行数:30,
注:本文中的BOOST_PP_INC函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ BOOST_PREVENT_MACRO_SUBSTITUTION函数代码示例 C++ BOOST_PP_ENUM_PARAMS函数代码示例 |