mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-28 08:02:00 +00:00
Use rvalue casting
This commit is contained in:
parent
3a74bc41ef
commit
c3a313b0e4
@ -2269,7 +2269,7 @@ iterator object_api<D>::end() const {
|
|||||||
template <typename D>
|
template <typename D>
|
||||||
template <typename T>
|
template <typename T>
|
||||||
item_accessor object_api<D>::operator[](T &&key) const {
|
item_accessor object_api<D>::operator[](T &&key) const {
|
||||||
return {derived(), reinterpret_borrow<object>(detail::object_or_cast(std::forward<T>(key)))};
|
return {derived(), detail::object_or_cast(std::forward<T>(key)).cast<object>()};
|
||||||
}
|
}
|
||||||
template <typename D>
|
template <typename D>
|
||||||
obj_attr_accessor object_api<D>::attr(handle key) const {
|
obj_attr_accessor object_api<D>::attr(handle key) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user