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

Class template small_vector_base

Boost , The Boost C++ Libraries BoostBook Documentation Subset , Boost.Container Header 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 small_vector_base

boost::container::small_vector_base

Synopsis

// In header: <boost/container/small_vector.hpp>
template<typename T, typename SecondaryAllocator> 
class small_vector_base : public boost::container::vector< T, small_vector_allocator< SecondaryAllocator > >
{
public:
  // construct/copy/destruct
  small_vector_base & operator=(const small_vector_base &);
  small_vector_base & operator=(small_vector_base &&);
  // public member functions
  void swap(small_vector_base &);
};

Description

Этот класс состоит из общего кода всех типов small_vector, которые не зависят от параметра шаблона «N». Этот класс не является копируемым и неразрушаемым, поэтому этот класс обычно используется в качестве аргумента ссылки на функции, которые читают или пишут небольшие векторы. С тех порМалый векторпроисходит отsmall_vector_base, преобразование вsmall_vector_baseявляется неявным

//Clients can pass any small_vector<Foo, N>.
void read_any_small_vector_of_foo(const small_vector_base<Foo> &in_parameter);
void modify_any_small_vector_of_foo(small_vector_base<Foo> &in_out_parameter);
void some_function()
{
   small_vector<Foo, 8> myvector;
   read_any_small_vector_of_foo(myvector);   // Reads myvector
   modify_any_small_vector_of_foo(myvector); // Modifies myvector
}

Все функцииboost::container:vectorявляются наследственными. См.вектордокументация для деталей.

small_vector_base public construct/copy/destruct

  1. small_vector_base&оператор=constsmall_vector_base&other;
  2. small_vector_base&оператор=small_vector_base&&other;

small_vector_base public member functions

  1. voidswapsmall_vector_base&other;

PrevUpHomeNext

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




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



:: Главная :: Boost.Container Header Reference ::


реклама


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

Время компиляции файла: 2024-08-30 11:47:00
2025-07-05 04:50:12/0.0035009384155273/0