template <typename T, typename U>

struct IsForwardingAssignmentAmbiguous

Defined at line 105 of file ../../third_party/abseil-cpp/absl/status/internal/statusor_internal.h

This trait detects whether `StatusOr

<T

>::operator=(U

&

&

)` is ambiguous, which

is equivalent to whether all the following conditions are met:

1. `U` is `StatusOr

<V

>`.

2. `T` is constructible and assignable from `V`.

3. `T` is constructible and assignable from `U` (i.e. `StatusOr

<V

>`).

For example, the following code is considered ambiguous:

(`T` is `bool`, `U` is `StatusOr

<bool

>`, `V` is `bool`)

StatusOr

<bool

> s1 = true; // s1.ok()

&

&

s1.ValueOrDie() == true

StatusOr

<bool

> s2 = false; // s2.ok()

&

&

s2.ValueOrDie() == false

s1 = s2; // ambiguous, `s1 = s2.ValueOrDie()` or `s1 = bool(s2)`?