Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Struct template or_

Boost , The Boost C++ Libraries BoostBook Documentation Subset , Reference

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Struct template or_

boost::proto::or_ — For matching one of a set of alternate grammars. Alternates are tried in order to avoid ambiguity. When used as a transform, proto::or_<> applies the transform associated with the first grammar that matches the expression.

Synopsis

// In header: <boost/proto/matches.hpp>
template<typename... G> 
struct or_ :  proto::transform<or_<G...> > {
  // types
  typedef or_ proto_grammar;
  // member classes/structs/unions
  template<typename Expr, typename State, typename Data> 
  struct impl :  proto::transform_impl< Expr, State, Data > {
    // types
    typedef unspecified result_type;
    // public member functions
    result_type operator()(typename impl::expr_param, 
                           typename impl::state_param, 
                           typename impl::data_param) const;
  };
};

Description

<proto::or_<G0,G1,...Gn>>, если<E>соответствует любому из<Gx>для<x>в<[0,n]>.

При применении<proto::or_<G0,G1,...Gn>>в качестве преобразования с выражением<e>типа<E>, состояния<s>и данных<d>он эквивалентен<Gx()(e, s, d)>, где<x>является наименьшим числом, таким, что<proto::matches<E, Gx>::value>является<true>.

Максимальное число принимаемых шаблонных аргументов<proto::or_<>>контролируется макросом<BOOST_PROTO_MAX_LOGICAL_ARITY>.


PrevUpHomeNext

Статья Struct template or_ раздела The Boost C++ Libraries BoostBook Documentation Subset Reference может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Reference ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-07-05 03:19:36/0.0050740242004395/1