Home
last modified time | relevance | path

Searched refs:unexpected_type (Results 1 – 2 of 2) sorted by relevance

/aosp12/system/libbase/include/android-base/
H A Dexpected.h90 using unexpected_type = unexpected<E>; variable
244 : var_(unexpected_type(std::forward<Args>(args)...)) {} in expected()
250 : var_(unexpected_type(il, std::forward<Args>(args)...)) {} in expected()
341 constexpr const E& error() const& { return std::get<unexpected_type>(var_).value(); } in error()
342 constexpr E& error() & { return std::get<unexpected_type>(var_).value(); } in error()
385 std::variant<value_type, unexpected_type> var_;
428 using unexpected_type = unexpected<E>; variable
508 : var_(unexpected_type(std::forward<Args>(args)...)) {} in expected()
514 : var_(unexpected_type(il, std::forward<Args>(args)...)) {} in expected()
566 constexpr E& error() & { return std::get<unexpected_type>(var_).value(); } in error()
[all …]
/aosp12/system/libbase/
H A Dexpected_test.cpp164 exp_int::unexpected_type unexp = unexpected(10); in TEST()
167 exp_double::unexpected_type unexp2 = unexpected(10.5f); in TEST()
170 exp_string::unexpected_type unexp3 = unexpected(std::string("error")); in TEST()
173 exp_void::unexpected_type unexp4 = unexpected(10); in TEST()
504 exp_int::unexpected_type error = 10; in TEST()
511 exp_void::unexpected_type error2 = 10; in TEST()
520 exp_int::unexpected_type error = 20; in TEST()
527 exp_void::unexpected_type error2 = 20; in TEST()
818 constexpr exp_int::unexpected_type err(3); in TEST()