std:: uses_allocator <std::function>
From cppreference.net
<
cpp
|
utility
|
functional
|
function
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Function objects
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Old binders and adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::function
| Member functions | ||||
|
(until C++17)
|
||||
| Non-member functions | ||||
|
(until C++20)
|
||||
| Helper classes | ||||
|
uses_allocator
<std::function>
(until C++17)
|
||||
| Deduction guides (C++17) |
|
헤더에 정의됨
<functional>
|
||
|
template
<
class
R,
class
...
ArgTypes
,
class
Alloc
>
struct uses_allocator < std:: function < R ( ArgTypes... ) > , Alloc > : std:: true_type { } ; |
(C++11부터)
(C++17까지) |
|
이 특수화는
std::uses_allocator
가
std::function
타입의 모든 객체가 내장된
allocator_type
을 가지고 있지 않더라도
uses-allocator construction
을 지원한다는 것을 다른 라이브러리 구성 요소에 알립니다.
목차 |
참고 사항
std::function
의 할당자 지원은 명세가 불명확하고 구현체마다 일관성이 없었습니다. 일부 구현체는 uses-allocator 구성을 전혀 지원하지 않으며, 일부는 필요한 생성자 오버로드를 제공하지만 제공된 할당자 인수를 무시하고, 또 다른 일부는 오버로드를 제공하고 구성 시에는 제공된 할당자를 사용하지만
std::function
이 재할당될 때는 사용하지 않았습니다. 결과적으로 C++17에서 할당자 지원이 제거되었습니다.
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 > |
참고 항목
|
(C++11)
|
지정된 타입이 uses-allocator 생성 방식을 지원하는지 확인합니다
(클래스 템플릿) |