Homec4science

Googletest export

Authored by Abseil Team <absl-team@google.com> on Nov 19 2019, 17:57.

Description

Googletest export

Add a breadcrumb about nullopt comparison near the Optional() matcher.

Also add a note about how otherwise-spurious 'Eq()' may be needed in some cases. Without this, something like Field(&MyStruct::optional_field_without_equals_equals, absl::nullopt) doesn't work - it converts the nullopt to an optional<> of the non-equalable type, and fails to select the operator==(optional<>, nullopt_t) overload. The Eq() lets the type persist later into the match.

PiperOrigin-RevId: 281305519

Details

Committed
Gennadiy Civil <misterg@google.com>Nov 20 2019, 20:16
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:50cfbb726b26: Googletest export
Branches
Unknown
Tags
Unknown

Event Timeline

Gennadiy Civil <misterg@google.com> committed R9484:4bf466236dbe: Googletest export (authored by Abseil Team <absl-team@google.com>).Nov 20 2019, 20:16