promise_uses_allocator

promise_uses_allocator (promise의 할당자 사용 특성)

이 페이지는 C++ 표준 라이브러리의 std::promise에 대한 std::uses_allocator 타입 특성의 특수화를 설명해요. 이 특수화는 promise 객체가 할당자(allocator)를 이용한 생성 방식을 지원한다는 것을 나타내며, 항상 true로 평가돼요. C++11부터 사용할 수 있어요.

출처: cppreference

본문

특수화

다음은 std::uses_allocator 타입 특성을 std::promise에 대해 특수화한 것이에요.

template < class R , class Alloc > struct uses_allocator < std :: promise < R > , Alloc > : std :: true_type {};

(since C++11)

이 특수화는 std::promise가 할당자 생성(uses-allocator construction)을 지원함을 나타내요.

std::integral_constant로부터 상속

이 특수화는 std::integral_constant<bool, true>로부터 상속받아요. 따라서 다음 멤버들을 사용할 수 있어요.

멤버 상수

이름 설명
value true (공용 정적 멤버 상수)

멤버 함수

이름 설명
operator bool 객체를 bool로 변환하며 value를 반환해요.
operator() (C++14) value를 반환해요.

멤버 타입

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

같이 보기

이름 설명
uses_allocator (C++11) 지정된 타입이 할당자 생성(uses-allocator construction)을 지원하는지 확인하는 클래스 템플릿이에요.

더 알아보기 (Learn more)

cppreference