• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ BOOST_PP_INC函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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,代码来源:call.hpp


示例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,代码来源:call.hpp


示例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,代码来源:sign.hpp


示例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,代码来源:basic_socket_iostream.hpp


示例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 pointers

template<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,代码来源:register_functions_iterate.hpp


示例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,代码来源:function_equal.hpp


示例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,代码来源:tuple_head_tail.hpp


示例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,代码来源:ForEach.hpp


示例9: BOOST_PP_REPEAT

BOOST_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,代码来源:seq_unpack.cpp


示例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,代码来源:apply.hpp


示例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 Walker

template < 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,代码来源:base_from_member.hpp


示例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,代码来源:make_size.hpp


示例13: defined

#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#endif

namespace 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,代码来源:validate.hpp


示例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
#endif

enum 
{
    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,代码来源:register_functions.hpp


示例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,代码来源:basic_socket_streambuf.hpp


示例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,代码来源:dispatch.hpp


示例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,代码来源:dispatch.hpp


示例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,代码来源:reverse_compile.cpp


示例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,代码来源:valmin.hpp


示例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,代码来源:sub2ind.hpp



注:本文中的BOOST_PP_INC函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ BOOST_PREVENT_MACRO_SUBSTITUTION函数代码示例发布时间:2022-05-30
下一篇:
C++ BOOST_PP_ENUM_PARAMS函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap