std::meta::exception
cppreference.net에서 가져옴
| 헤더 <meta>
|
||
class exception : public std::exception
|
에 정의됨 (C++26부터) | |
리플렉션 함수가 실패할 때 던져지는 객체의 타입을 정의합니다.
std::meta::exception 타입의 객체는 상수 평가(constant evaluation)에서만 생성되고 접근될 수 있습니다.
멤버 함수
(생성자) |
meta::exception 객체를 생성합니다 (공개 멤버 함수) |
what |
설명 문자열을 반환합니다 (공개 멤버 함수) |
u8what |
설명 문자열을 std::u8string_view 로 반환합니다 (공개 멤버 함수) |
from |
연관된 std::meta::info 객체를 반환합니다 (공개 멤버 함수) |
where |
연관된 std::source_location 을 반환합니다 (공개 멤버 함수) |
std::meta::exception::exception
consteval exception( std::u8string_view u8what_arg, std::meta::info from,
std::source_location where = std::source_location::current() ) noexcept;
|
(1) | |
consteval exception( std::string_view what_arg, std::meta::info from,
std::source_location where = std::source_location::current() ) noexcept;
|
(2) | |
consteval exception( const exception& ) = default;
|
(3) | |
consteval exception( exception&& ) = default;
|
(4) | |
새로운 std::meta::info 객체를 생성합니다. 저장된 값을 해당 매개변수로 초기화합니다.
1)
u8what_arg이 일반 리터럴 인코딩으로 표현될 수 있으면, what()이 반환하는 설명 문자열은 u8what_arg UTF-8에서 일반 리터럴 인코딩으로 변환됩니다; 그렇지 않으면 what()에 대한 호출은 상수 표현식이 아닙니다.2)
what_arg은 UTF-8로 표현 가능해야 합니다.3) 복사 생성자는 기본 설정됩니다(defaulted).
4) 이동 생성자는 기본 설정됩니다.
std::meta::exception::what
constexpr const char* what() const noexcept override;
|
||
생성 시 전달된 설명 문자열을 반환하며, UTF-8에서 일반 리터럴 인코딩으로 변환될 수 있습니다.
std::meta::exception::u8what
consteval std::u8string_view u8what() const noexcept;
|
||
생성 시 전달된 설명 문자열을 반환하며, 일반 리터럴 인코딩에서 UTF-8로 변환될 수 있습니다.
std::meta::exception::from
consteval std::meta::info from() const noexcept;
|
||
생성 시 전달된 std::meta::info 값을 반환합니다.
std::meta::exception::where
consteval std::source_location where() const noexcept;
|
||
생성 시 전달된 std::source_location 값을 반환합니다.
예제
| 이 섹션은 완성되지 않았습니다 이유: 예제 없음 |