template <class T, class E>

class expected

Defined at line 181 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

Class expected

Public Methods

void expected<T, E> ()

Delegate simple operations to the underlying std::variant. std::variant

doesn't set noexcept well, at least for copy ctor/assign, so set it

explicitly. Technically the copy/move assignment operators should also be

deleted if neither T nor E satisfies is_nothrow_move_constructible_v, but

that would require making these operator= methods into template functions.

Defined at line 202 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

void expected<T, E> (const expected<T, E> & rhs)

Defined at line 203 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

void expected<T, E> (expected<T, E> && rhs)

Defined at line 205 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

expected<T, E> & operator= (const expected<T, E> & rhs)

Defined at line 207 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

expected<T, E> & operator= (expected<T, E> && rhs)

Defined at line 210 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <, , >
void expected<T, E> (const expected<U, G> & rhs)

NOLINTNEXTLINE(google-explicit-constructor)

Defined at line 226 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <, , >
void expected<T, E> (expected<U, G> && rhs)

NOLINTNEXTLINE(google-explicit-constructor)

Defined at line 228 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class U = T, >
void expected<T, E> (U && v)

NOLINTNEXTLINE(google-explicit-constructor)

Defined at line 240 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <, >
void expected<T, E> (const unexpected<G> & e)

NOLINTNEXTLINE(google-explicit-constructor)

Defined at line 246 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <, >
void expected<T, E> (unexpected<G> && e)

NOLINTNEXTLINE(google-explicit-constructor)

Defined at line 248 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class... Args, >
void expected<T, E> (std::in_place_t , Args &&... args)

in_place_t construction

Defined at line 252 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class U, class... Args, >
void expected<T, E> (std::in_place_t , std::initializer_list<U> il, Args &&... args)

in_place_t with initializer_list construction

Defined at line 259 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class... Args, >
void expected<T, E> (unexpect_t , Args &&... args)

unexpect_t construction

Defined at line 265 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class U, class... Args, >
void expected<T, E> (unexpect_t , std::initializer_list<U> il, Args &&... args)

unexpect_t with initializer_list construction

Defined at line 272 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class U = T, >
expected<T, E> & operator= (U && v)

Assignment from (converted) success value, using a forwarding reference.

Defined at line 282 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <, >
expected<T, E> & operator= (const unexpected<G> & e)

Defined at line 292 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <, >
expected<T, E> & operator= (unexpected<G> && e)

Defined at line 294 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class... Args, >
T & emplace (Args &&... args)

modifiers

Defined at line 299 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class U, class... Args, >
T & emplace (std::initializer_list<U> il, Args &&... args)

Defined at line 306 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class U = T, >
void swap (expected<T, E> & rhs)

Swap. This function takes a template argument so that _ENABLE_IF works.

Defined at line 318 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

const T * operator-> ()

observers

Defined at line 326 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

T * operator-> ()

Defined at line 327 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

const T & operator* ()

Defined at line 328 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

T & operator* ()

Defined at line 329 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

const T && operator* ()

Defined at line 330 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

T && operator* ()

Defined at line 331 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

bool has_value ()

Defined at line 333 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

bool ok ()

Defined at line 334 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

bool operator bool ()

Defined at line 335 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

const T & value ()

Defined at line 337 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

T & value ()

Defined at line 338 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

const T && value ()

Defined at line 339 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

T && value ()

Defined at line 340 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

const E & error ()

Defined at line 342 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

E & error ()

Defined at line 343 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

const E && error ()

Defined at line 344 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

E && error ()

Defined at line 345 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class U, >
T value_or (U && v)

Defined at line 351 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

template <class U, >
T value_or (U && v)

Defined at line 360 of file ../../third_party/android/platform/system/libbase/include/android-base/expected.h

Friends

template <class T1, class E1, class E2>
bool expected (const unexpected<E2> & , const expected<T1, E1> & )
template <class T1, class E1, class E2>
bool expected (const expected<T1, E1> & , const unexpected<E2> & )
template <class T1, class E1, class E2>
bool expected (const unexpected<E2> & , const expected<T1, E1> & )
template <class T1, class E1, class E2>
bool expected (const expected<T1, E1> & , const unexpected<E2> & )
template <class T1, class E1, class T2, class E2>
bool expected (const expected<T1, E1> & x, const expected<T2, E2> & y)
template <class T1class E1class T2class E2>
bool expected (const expected<T1, E1> & xconst expected<T2, E2> & y)