From fdf66660f2b1a275f204c4fc1e77b5bb12544efa Mon Sep 17 00:00:00 2001 From: pybind11_protobuf authors Date: Mon, 18 May 2026 23:08:40 -0700 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 917623315 --- pybind11_protobuf/tests/pass_by_module.cc | 4 ++-- pybind11_protobuf/tests/wrapped_proto_module.cc | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pybind11_protobuf/tests/pass_by_module.cc b/pybind11_protobuf/tests/pass_by_module.cc index ea57fb5..8b815fc 100644 --- a/pybind11_protobuf/tests/pass_by_module.cc +++ b/pybind11_protobuf/tests/pass_by_module.cc @@ -172,7 +172,7 @@ PYBIND11_MODULE(pass_by_module, m) { m.def( "std_variant", - [](absl::variant message, int value) { + [](std::variant message, int value) { if (absl::holds_alternative(message)) { return CheckIntMessage(&absl::get(message), value); } @@ -182,7 +182,7 @@ PYBIND11_MODULE(pass_by_module, m) { m.def( "std_optional", - [](absl::optional message, int value) { + [](std::optional message, int value) { if (message.has_value()) { return CheckIntMessage(&message.value(), value); } diff --git a/pybind11_protobuf/tests/wrapped_proto_module.cc b/pybind11_protobuf/tests/wrapped_proto_module.cc index 364054e..4e74eea 100644 --- a/pybind11_protobuf/tests/wrapped_proto_module.cc +++ b/pybind11_protobuf/tests/wrapped_proto_module.cc @@ -160,7 +160,7 @@ TestMessage GetValue() { return TestMessage(); } // Note that this should never actually run. TestMessage&& GetRValue() { return std::move(kMessage); } absl::StatusOr GetStatusOr() { return TestMessage(); } -absl::optional GetOptional() { return TestMessage(); } +std::optional GetOptional() { return TestMessage(); } std::vector GetVector() { return {}; } void PassInt(int) {} @@ -168,7 +168,7 @@ void PassConstReference(const TestMessage&) {} void PassConstPtr(const TestMessage*) {} void PassValue(TestMessage) {} void PassRValue(TestMessage&&) {} -void PassOptional(absl::optional) {} +void PassOptional(std::optional) {} void PassVector(std::vector) {} struct Struct { @@ -212,7 +212,7 @@ void test_static_asserts() { WithWrappedProtos(&Struct::ConstMemberFn)); absl::FunctionRef()>( WithWrappedProtos(GetStatusOr)); - absl::FunctionRef()>( + absl::FunctionRef()>( WithWrappedProtos(GetOptional)); absl::FunctionRef()>(WithWrappedProtos(GetVector)); @@ -223,7 +223,7 @@ void test_static_asserts() { absl::FunctionRef(WithWrappedProtos(PassConstPtr)); absl::FunctionRef(WithWrappedProtos(PassValue)); absl::FunctionRef(WithWrappedProtos(PassRValue)); - absl::FunctionRef)>( + absl::FunctionRef)>( WithWrappedProtos(PassOptional)); absl::FunctionRef)>( WithWrappedProtos(PassVector));