От: | Коваленко Дмитрий | http://www.ibprovider.com | |
Дата: | 29.01.20 09:06 | ||
Оценка: |
Ошибка C2338 vector<T, Allocator> requires that Allocator's value_type match T (See N4659 26.2.1 [container.requirements.general]/16 allocator_type) Either fix the allocator value_type or define _ENFORCE_MATCHING_ALLOCATORS=0 to suppress this diagnostic.
class vector { // varying size array of values
//.... вот эта проверка
static_assert(!_ENFORCE_MATCHING_ALLOCATORS || is_same_v<_Ty, typename _Alloc::value_type>,
_MISMATCHED_ALLOCATOR_MESSAGE("vector<T, Allocator>", "T"));
template<class T,class allocator>
using t_stl_vector
=std::vector
<T,
typename allocator::template rebind<T>::other>;
template<class Key,class T,class Less,class allocator=t_void_allocator>
using t_stl_map
=std::map
<Key,
T,
Less,
typename allocator::template rebind<std::pair<const Key,T>>::other>;