std::expected<T,E>:: error
From cppreference.net
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::expected
|
constexpr
const
E
&
error
(
)
const
&
noexcept
;
|
(1) | (C++23부터) |
|
constexpr
E
&
error
(
)
&
noexcept
;
|
(2) | (C++23부터) |
|
constexpr
const
E
&&
error
(
)
const
&&
noexcept
;
|
(3) | (C++23부터) |
|
constexpr
E
&&
error
(
)
&&
noexcept
;
|
(4) | (C++23부터) |
* this 에 포함된 예상치 못한 값에 접근합니다.
|
만약 has_value() 가 true 라면, 동작은 정의되지 않습니다. |
(C++26까지) |
|
만약 has_value() 가 true 라면:
|
(C++26부터) |
반환값
1,2)
unex
3,4)
std
::
move
(
unex
)
예제
|
이 섹션은 불완전합니다
이유: 예제가 없음 |
참고 항목
|
예상치 못한 값이 있으면 해당 값을 반환하고, 그렇지 않으면 다른 값을 반환합니다
(public member function) |
|
|
예상된 값에 접근합니다
(public member function) |
|
|
예상된 값을 반환합니다
(public member function) |
|
|
객체가 예상된 값을 포함하는지 확인합니다
(public member function) |