171 template <
typename... Targs>
179 template <
typename... Targs>
203 expected(const detail::ok<ValueType>& successValue) noexcept;
212 expected(detail::ok<ValueType>&& successValue) noexcept;
221 expected(const detail::err<ErrorType>& errorValue) noexcept;
230 expected(detail::err<ErrorType>&& errorValue) noexcept;
235 explicit operator
bool() const noexcept;
239 bool has_value() const noexcept;
243 bool has_error() const noexcept;
248 ErrorType&
error(bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) & noexcept;
253 const ErrorType&
error(bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) const& noexcept;
258 ErrorType&&
error(bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) && noexcept;
264 error(bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) const&& noexcept;
271 template <typename U = ValueType>
273 value(bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) & noexcept;
280 template <typename U = ValueType>
282 value(bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) const& noexcept;
288 template <typename U = ValueType>
290 value(bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) && noexcept;
296 template <typename U = ValueType>
298 value(bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) const&& noexcept;
310 template <typename U = ValueType>
323 template <typename U = ValueType>
335 template <typename U = ValueType>
347 template <typename U = ValueType>
365 operator
expected<
void, ErrorType>() const noexcept;
367 template <typename T, typename E>
371 template <typename U = ValueType>
373 template <typename U = ValueType>
374 const
enable_if_non_void_t<U>& value_checked(bb::detail::SourceLocation location) const& noexcept;
376 ErrorType& error_checked(bb::detail::SourceLocation location) & noexcept;
377 const ErrorType& error_checked(bb::detail::SourceLocation location) const& noexcept;
379 template <typename E = ErrorType>
380 std::enable_if_t<!(std::is_integral<E>::value || std::is_enum<E>::value),
void>
381 log_error_unchecked() const noexcept;
383 template <typename E = ErrorType>
384 std::enable_if_t<std::is_integral<E>::value,
void> log_error_unchecked() const noexcept;
386 template <typename E = ErrorType>
387 std::enable_if_t<std::is_enum<E>::value,
void> log_error_unchecked() const noexcept;
390 detail::expected_storage<ValueType, ErrorType> m_store;
constexpr bool operator!=(const expected< ValueType, ErrorType > &lhs, const expected< ValueType, ErrorType > &rhs) noexcept
inequality check for two distinct expected types
constexpr bool operator==(const expected< ValueType, ErrorType > &lhs, const expected< ValueType, ErrorType > &rhs) noexcept
equality check for two distinct expected types