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

Class template move_iterator

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

Class template move_iterator

boost::move_iterator

Synopsis

// In header: <boost/move/iterator.hpp>
template<typename It> 
class move_iterator {
public:
  // types
  typedef It                                                                  iterator_type;    
  typedef boost::movelib::iterator_traits< iterator_type >::value_type        value_type;       
  typedef value_type &&                                                       reference;        
  typedef It                                                                  pointer;          
  typedef boost::movelib::iterator_traits< iterator_type >::difference_type   difference_type;  
  typedef boost::movelib::iterator_traits< iterator_type >::iterator_category iterator_category;
  // construct/copy/destruct
  move_iterator();
  explicit move_iterator(const It &);
  template<typename U> move_iterator(const move_iterator< U > &);
  // public member functions
  reference operator*() const;
  pointer operator->() const;
  move_iterator & operator++();
  move_iterator< iterator_type > operator++(int);
  move_iterator & operator--();
  move_iterator< iterator_type > operator--(int);
  move_iterator< iterator_type > operator+(difference_type) const;
  move_iterator & operator+=(difference_type);
  move_iterator< iterator_type > operator-(difference_type) const;
  move_iterator & operator-=(difference_type);
  reference operator[](difference_type) const;
};

Description

Классный шаблонmove_iteratorявляется адаптером итератора с тем же поведением, что и базовый итератор, за исключением того, что его оператор отсчета неявно преобразует значение, возвращенное оператором отсчета от базового итератора, в отсчет r. Некоторые общие алгоритмы можно назвать итераторами перемещения, чтобы заменить копирование движением.

move_iterator public construct/copy/destruct

  1. <
    move_iterator();
    >
  2. <
    explicitmove_iterator(constIt&i);
    >
  3. <
    template<typenameU>move_iterator(constmove_iterator<U>&u);
    >

move_iterator public member functions

  1. <
    referenceoperator*()const;
    >
  2. <
    pointeroperator->()const;
    >
  3. <
    move_iterator&operator++();
    >
  4. <
    move_iterator<iterator_type>operator++(int);
    >
  5. <
    move_iterator&operator--();
    >
  6. <
    move_iterator<iterator_type>operator--(int);
    >
  7. <
    move_iterator<iterator_type>operator+(difference_typen)const;
    >
  8. <
    move_iterator&operator+=(difference_typen);
    >
  9. <
    move_iterator<iterator_type>operator-(difference_typen)const;
    >
  10. <
    move_iterator&operator-=(difference_typen);
    >
  11. <
    referenceoperator[](difference_typen)const;
    >

PrevUpHomeNext

Статья Class template move_iterator раздела 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 06:59:47/0.0061290264129639/0