LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
LIEF::ok_error_t Class Reference

Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead, it makes the output explicit such as: More...

#include <errors.hpp>

Inheritance diagram for LIEF::ok_error_t:
Collaboration diagram for LIEF::ok_error_t:

Additional Inherited Members

Public Types inherited from tl::expected< ok_t, lief_errors >
typedef ok_t value_type
typedef lief_errors error_type
typedef unexpected< lief_errorsunexpected_type
Public Member Functions inherited from tl::expected< ok_t, lief_errors >
constexpr auto and_then (F &&f) &-> decltype(and_then_impl(std::declval< expected & >(), std::forward< F >(f)))
constexpr decltype(expected_map_impl(std::declval< expected & >(), std::declval< F && >())) map (F &&f) &
constexpr decltype(expected_map_impl(std::declval< expected & >(), std::declval< F && >())) transform (F &&f) &
constexpr decltype(map_error_impl(std::declval< expected & >(), std::declval< F && >())) map_error (F &&f) &
constexpr decltype(map_error_impl(std::declval< expected & >(), std::declval< F && >())) transform_error (F &&f) &
expected constexpr or_else (F &&f) &
constexpr expected ()=default
expectedoperator= (const expected &rhs)=default
void emplace (Args &&...args)
detail::enable_if_t< detail::is_swappable< OT >::value &&detail::is_swappable< OE >::value &&(std::is_nothrow_move_constructible< OT >::value||std::is_nothrow_move_constructible< OE >::value)> swap (expected &rhs) noexcept(std::is_nothrow_move_constructible< ok_t >::value &&detail::is_nothrow_swappable< ok_t >::value &&std::is_nothrow_move_constructible< lief_errors >::value &&detail::is_nothrow_swappable< lief_errors >::value)
constexpr const ok_t * operator-> () const
constexpr const U & operator* () const &
constexpr bool has_value () const noexcept
constexpr operator bool () const noexcept
constexpr const U & value () const &
constexpr const lief_errorserror () const &
constexpr ok_t value_or (U &&v) const &

Detailed Description

Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead, it makes the output explicit such as:

ok_error_t process() {
if (fail) {
return make_error_code(...);
}
return ok();
}
Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead,...
Definition errors.hpp:114
tl::unexpected< lief_errors > make_error_code(lief_errors e)
Create an standard error code from lief_errors.
Definition errors.hpp:53
ok_t ok()
Return success for function with return type ok_error_t.
Definition errors.hpp:98

The documentation for this class was generated from the following file: