Boost C++ 库

...世界上最受推崇和设计精良的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu,《C++ 编码规范

模数结构模板 - Boost C++ 函数库
PrevUpHomeNext

模数结构模板

boost::proto::modulus — 一个用于生成模表达式类型的元函数,一个用于匹配模表达式的语法元素,以及一个 PrimitiveTransform,它分派到 proto::pass_through<> 转换。

提要

// In header: <boost/proto/traits.hpp>

template<typename T, typename U> 
struct modulus :  proto::transform< modulus<T, U> > {
  // types
  typedef proto::expr< proto::tag::modulus, proto::list2< T, U > >       type;         
  typedef proto::basic_expr< proto::tag::modulus, proto::list2< T, U > > proto_grammar;

  // member classes/structs/unions
  template<typename Expr, typename State, typename Data> 
  struct impl :
     proto::pass_through<modulus>::template impl<Expr, State, Data>
  {
  };
};

描述


PrevUpHomeNext