Namespaces
Variants

std:: uses_allocator <std::flat_map>

From cppreference.net

헤더 파일에 정의됨 <flat_map>
template < class Key, class T, class Compare,

class KeyContainer, class MappedContainer, class Allocator >
struct uses_allocator < std:: flat_map < Key, T, Compare,
KeyContainer, MappedContainer > , Allocator >
: std:: bool_constant < std:: uses_allocator_v < KeyContainer, Allocator > &&

std:: uses_allocator_v < MappedContainer, Allocator >> { } ;
(C++23부터)

std::uses_allocator 타입 트레이트에 대한 투명한 특수화를 제공합니다: std:: flat_map 의 경우, 기본 컨테이너가 할당자를 사용하는 경우에만 이 컨테이너 어댑터도 할당자를 사용합니다.

목차

std:: integral_constant 에서 상속됨

멤버 상수

value
[static]
true
(public static member constant)

멤버 함수

operator bool
객체를 bool 로 변환, value 반환
(public member function)
operator()
(C++14)
value 반환
(public member function)

멤버 타입

타입 정의
value_type bool
type std:: integral_constant < bool , value >

예제

#include <memory>
#include <flat_map>
static_assert(
    std::uses_allocator<std::flat_map<int, int>, void>::value == false &&
    std::uses_allocator<std::flat_map<int, int>, std::allocator<int>>::value == true
);
int main() {}

참고 항목

지정된 타입이 uses-allocator construction을 지원하는지 확인합니다
(클래스 템플릿)