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

Struct at

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 at

boost::xpressive::op::at — at is a PolymorphicFunctionObject for indexing into a sequence

Synopsis

// In header: <boost/xpressive/regex_actions.hpp>

struct at {
  // member classes/structs/unions
  template<typename Sig> 
  struct result {
  };
  template<typename This, typename Cont, typename Idx> 
  struct result<This(Cont &, Idx)> {
    // types
    typedef Cont::reference type;
  };
  template<typename This, typename Cont, typename Idx> 
  struct result<This(Cont const &, Idx)> {
    // types
    typedef Cont::const_reference type;
  };
  template<typename This, typename Cont, typename Idx> 
  struct result<This(Cont, Idx)> {
    // types
    typedef Cont::const_reference type;
  };
  // public member functions
  template<typename Cont, typename Idx> 
    Cont::reference operator()(Cont &, Idx) const;
  template<typename Cont, typename Idx> 
    Cont::const_reference operator()(Cont const &, Idx) const;
};

Description

at public member functions

  1. <
    template<typenameCont,typenameIdx>
     Cont::referenceoperator()(Cont&c,Idxidx)const;
    >

    Параметры:

    <c>

    Последовательность случайностей индексируется в

    <idx>

    Индекс

    Требует:

    <Cont>является моделью случайной последовательности

    .

    Возвращение:

    <c[idx]>

  2. <
    template<typenameCont,typenameIdx>
     Cont::const_referenceoperator()(Contconst&c,Idxidx)const;
    >

    Это перегруженная функция члена, предусмотренная для удобства. Он отличается от вышеуказанной функции только тем, какие аргументы он принимает.


PrevUpHomeNext

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




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



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


реклама


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

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 00:47:44/0.0054261684417725/1