Googletest export

googletest: Add printer for {std,absl}::nullopt.
PiperOrigin-RevId: 399928554
This commit is contained in:
Abseil Team
2021-09-30 10:34:43 -04:00
committed by CJ Johnson
parent ab36804e42
commit 3b49be074d
3 changed files with 11 additions and 0 deletions

View File

@@ -742,6 +742,14 @@ class UniversalPrinter<Optional<T>> {
}
};
template <>
class UniversalPrinter<decltype(Nullopt())> {
public:
static void Print(decltype(Nullopt()), ::std::ostream* os) {
*os << "(nullopt)";
}
};
#endif // GTEST_INTERNAL_HAS_OPTIONAL
#if GTEST_INTERNAL_HAS_VARIANT