mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
6b7cc9e5d1
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -195,9 +195,10 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
# TODO: Fails on 3.10, investigate
|
||||
- python-version: "3.9"
|
||||
python-debug: true
|
||||
valgrind: true
|
||||
# JOB DISABLED (NEEDS WORK): https://github.com/pybind/pybind11/issues/4889
|
||||
# - python-version: "3.9"
|
||||
# python-debug: true
|
||||
# valgrind: true
|
||||
- python-version: "3.11"
|
||||
python-debug: false
|
||||
|
||||
|
@ -42,13 +42,15 @@ using make_caster = type_caster<intrinsic_t<type>>;
|
||||
// Shortcut for calling a caster's `cast_op_type` cast operator for casting a type_caster to a T
|
||||
template <typename T>
|
||||
typename make_caster<T>::template cast_op_type<T> cast_op(make_caster<T> &caster) {
|
||||
return caster.operator typename make_caster<T>::template cast_op_type<T>();
|
||||
using result_t = typename make_caster<T>::template cast_op_type<T>; // See PR #4893
|
||||
return caster.operator result_t();
|
||||
}
|
||||
template <typename T>
|
||||
typename make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>
|
||||
cast_op(make_caster<T> &&caster) {
|
||||
return std::move(caster).operator typename make_caster<T>::
|
||||
template cast_op_type<typename std::add_rvalue_reference<T>::type>();
|
||||
using result_t = typename make_caster<T>::template cast_op_type<
|
||||
typename std::add_rvalue_reference<T>::type>; // See PR #4893
|
||||
return std::move(caster).operator result_t();
|
||||
}
|
||||
|
||||
template <typename type>
|
||||
|
Loading…
Reference in New Issue
Block a user