summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-port.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2021-09-30 14:34:43 (GMT)
committerCJ Johnson <johnsoncj@google.com>2021-09-30 23:07:32 (GMT)
commit3b49be074d5c1340eeb447e6a8e78427051e675a (patch)
treeeb95355ba469dc98e973ef0a4eed01ff49b0d602 /googletest/include/gtest/internal/gtest-port.h
parentab36804e42d4cb85b7e7fe9946928597840684db (diff)
downloadgoogletest-3b49be074d5c1340eeb447e6a8e78427051e675a.zip
googletest-3b49be074d5c1340eeb447e6a8e78427051e675a.tar.gz
googletest-3b49be074d5c1340eeb447e6a8e78427051e675a.tar.bz2
Googletest export
googletest: Add printer for {std,absl}::nullopt. PiperOrigin-RevId: 399928554
Diffstat (limited to 'googletest/include/gtest/internal/gtest-port.h')
-rw-r--r--googletest/include/gtest/internal/gtest-port.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 0b42dde..790fdd8 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -2325,6 +2325,7 @@ namespace testing {
namespace internal {
template <typename T>
using Optional = ::absl::optional<T>;
+inline ::absl::nullopt_t Nullopt() { return ::absl::nullopt; }
} // namespace internal
} // namespace testing
#else
@@ -2338,6 +2339,7 @@ namespace testing {
namespace internal {
template <typename T>
using Optional = ::std::optional<T>;
+inline ::std::nullopt_t Nullopt() { return ::std::nullopt; }
} // namespace internal
} // namespace testing
// The case where absl is configured NOT to alias std::optional is not