Skip to content

Commit

Permalink
Qualify detail::forward_like to avoid conflict. (pybind#4136)
Browse files Browse the repository at this point in the history
C++23 feature: P2445R1 forward_like()
  • Loading branch information
StephanTLavavej authored Aug 12, 2022
1 parent b884b9d commit 2d59b43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/pybind11/stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct set_caster {
pybind11::set s;
for (auto &&value : src) {
auto value_ = reinterpret_steal<object>(
key_conv::cast(forward_like<T>(value), policy, parent));
key_conv::cast(detail::forward_like<T>(value), policy, parent));
if (!value_ || !s.add(std::move(value_))) {
return handle();
}
Expand Down Expand Up @@ -122,9 +122,9 @@ struct map_caster {
}
for (auto &&kv : src) {
auto key = reinterpret_steal<object>(
key_conv::cast(forward_like<T>(kv.first), policy_key, parent));
key_conv::cast(detail::forward_like<T>(kv.first), policy_key, parent));
auto value = reinterpret_steal<object>(
value_conv::cast(forward_like<T>(kv.second), policy_value, parent));
value_conv::cast(detail::forward_like<T>(kv.second), policy_value, parent));
if (!key || !value) {
return handle();
}
Expand Down Expand Up @@ -178,7 +178,7 @@ struct list_caster {
ssize_t index = 0;
for (auto &&value : src) {
auto value_ = reinterpret_steal<object>(
value_conv::cast(forward_like<T>(value), policy, parent));
value_conv::cast(detail::forward_like<T>(value), policy, parent));
if (!value_) {
return handle();
}
Expand Down Expand Up @@ -242,7 +242,7 @@ struct array_caster {
ssize_t index = 0;
for (auto &&value : src) {
auto value_ = reinterpret_steal<object>(
value_conv::cast(forward_like<T>(value), policy, parent));
value_conv::cast(detail::forward_like<T>(value), policy, parent));
if (!value_) {
return handle();
}
Expand Down

0 comments on commit 2d59b43

Please sign in to comment.