Пространства имён
Варианты
Действия

std::uses_allocator<std::tuple>

Материал из cppreference.com

 
 
 
std::tuple
Член функций
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
tuple::tuple
tuple::operator=
tuple::swap
Не являющиеся членами функций
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
make_tuple
tie
forward_as_tuple
None
operator=
operator!=
operator<
operator<=
operator>
operator>=
std::swap
get
Вспомогательные классы
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
tuple_size
tuple_element
uses_allocator
ignore
 
Заголовочный файл <tuple>
template< class... Types, class Alloc >
struct uses_allocator< std::tuple<Types...>, Alloc > : std::true_type { };
(начиная с C++11)
Эта специализация std::uses_allocator сообщает другими компонентами библиотеки, что кортежи поддержку использует-распределитель строительства, даже если они не имеют вложенных allocator_type.
Original:
This specialization of std::uses_allocator informs other library components that tuples support uses-allocator construction, even though they do not have a nested allocator_type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Содержание

Унаследован от std::integral_constant

Member constants

value
[static]
true
(public static константа-член)

Member functions

operator bool
преобразует объект в bool, возвращает value
Original:
converts the object to bool, returns value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член)

Member types

Type
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
value_type bool
type std::integral_constant<bool, value>

[править] Пример

// myalloc is a stateful Allocator with a single-argument constructor
// that takes an int. It has no default constructor.
 
    typedef std::vector<int, myalloc<int>> innervector_t;
    typedef std::tuple<int, innervector_t> elem_t;
    typedef std::scoped_allocator_adaptor< myalloc<elem_t>, myalloc<int>> Alloc;
    Alloc a(1,2);
    std::vector<elem_t, Alloc> v(a);
    v.resize(1);                  // uses allocator #1 for elements of v
    std::get<1>(v[0]).resize(10); // uses allocator #2 for innervector_t


[править] См. также

проверяет, является ли указанный тип поддерживает использование-распределитель строительства
Original:
checks if the specified type supports uses-allocator construction
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(шаблон класса) [edit]