Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pybind11_protobuf/tests/pass_by_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ PYBIND11_MODULE(pass_by_module, m) {

m.def(
"std_variant",
[](absl::variant<absl::monostate, IntMessage> message, int value) {
[](std::variant<absl::monostate, IntMessage> message, int value) {
if (absl::holds_alternative<IntMessage>(message)) {
return CheckIntMessage(&absl::get<IntMessage>(message), value);
}
Expand All @@ -182,7 +182,7 @@ PYBIND11_MODULE(pass_by_module, m) {

m.def(
"std_optional",
[](absl::optional<IntMessage> message, int value) {
[](std::optional<IntMessage> message, int value) {
if (message.has_value()) {
return CheckIntMessage(&message.value(), value);
}
Expand Down
8 changes: 4 additions & 4 deletions pybind11_protobuf/tests/wrapped_proto_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ TestMessage GetValue() { return TestMessage(); }
// Note that this should never actually run.
TestMessage&& GetRValue() { return std::move(kMessage); }
absl::StatusOr<TestMessage> GetStatusOr() { return TestMessage(); }
absl::optional<TestMessage> GetOptional() { return TestMessage(); }
std::optional<TestMessage> GetOptional() { return TestMessage(); }
std::vector<TestMessage> GetVector() { return {}; }

void PassInt(int) {}
void PassConstReference(const TestMessage&) {}
void PassConstPtr(const TestMessage*) {}
void PassValue(TestMessage) {}
void PassRValue(TestMessage&&) {}
void PassOptional(absl::optional<TestMessage>) {}
void PassOptional(std::optional<TestMessage>) {}
void PassVector(std::vector<TestMessage>) {}

struct Struct {
Expand Down Expand Up @@ -212,7 +212,7 @@ void test_static_asserts() {
WithWrappedProtos(&Struct::ConstMemberFn));
absl::FunctionRef<absl::StatusOr<TestMessage>()>(
WithWrappedProtos(GetStatusOr));
absl::FunctionRef<absl::optional<TestMessage>()>(
absl::FunctionRef<std::optional<TestMessage>()>(
WithWrappedProtos(GetOptional));
absl::FunctionRef<std::vector<TestMessage>()>(WithWrappedProtos(GetVector));

Expand All @@ -223,7 +223,7 @@ void test_static_asserts() {
absl::FunctionRef<void(const TestMessage*)>(WithWrappedProtos(PassConstPtr));
absl::FunctionRef<void(TestMessage)>(WithWrappedProtos(PassValue));
absl::FunctionRef<void(TestMessage &&)>(WithWrappedProtos(PassRValue));
absl::FunctionRef<void(absl::optional<TestMessage>)>(
absl::FunctionRef<void(std::optional<TestMessage>)>(
WithWrappedProtos(PassOptional));
absl::FunctionRef<void(std::vector<TestMessage>)>(
WithWrappedProtos(PassVector));
Expand Down
Loading