allocator_traits
描述 (Description)
它为分配器类型提供统一的接口。
声明 (Declaration)
以下是std :: allocator_traits函数的声明。
template <class Alloc> struct allocator_traits;
C++11
template <class Alloc> struct allocator_traits;
参数 (Parameters)
T - 它包含有关元素类型的信息。
成员类型 (Member types)
类型 | 定义 |
---|---|
allocator_type | 模板参数 |
value_type | allocator_type::value_type |
pointer | allocator_type::pointer |
const_pointer (在C ++ 17中弃用) | const T * |
reference (在C ++ 17中弃用) | T& |
const_reference (在C ++ 17中弃用) | const T& |
size_type (在C ++ 17中弃用) | std::size_t |
difference_type (在C ++ 17中弃用) | std::ptrdiff_t |
propagate_on_container_move_assignment (C ++ 14) | std::true_type |
rebind (在C ++ 17中弃用) | template |
rebind_traits | allocator_traits<rebind_alloc<T>> |