std:: nontype, std:: nontype_t
From cppreference.net
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Function objects
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Old binders and adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
헤더에 정의됨
<utility>
|
||
|
template
<
auto
V
>
struct nontype_t { explicit nontype_t ( ) = default ; } ; |
(1) | (C++26부터) |
|
template
<
auto
V
>
constexpr std :: nontype_t < V > nontype { } ; |
(2) | (C++26부터) |
1)
클래스 템플릿
std::nontype_t
는 의도된 태그와 매치하기 위해 생성자의 매개변수 목록에서 사용될 수 있습니다.
2)
해당
std::nontype
인스턴스
(1)
는
std::
function_ref
의 생성자에 전달할 수 있는 중의성 제거 인자 태그로, 포함된 객체가 상수 템플릿 매개변수
V
의 값으로 생성되어야 함을 나타냅니다.
템플릿 매개변수
| V | - | 구조적 타입 의 상수 템플릿 매개변수. |
참고 항목
|
(C++26)
|
모든 호출 가능 객체의 비소유 래퍼
(클래스 템플릿) |