mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-01 04:25:36 +08:00
improved pair type caster (fixes #155)
This commit is contained in:
parent
912feec119
commit
a3ee1a4591
@ -521,7 +521,8 @@ public:
|
|||||||
template <typename T> using cast_op_type = type;
|
template <typename T> using cast_op_type = type;
|
||||||
|
|
||||||
operator type() {
|
operator type() {
|
||||||
return type(first, second);
|
return type(first .operator typename type_caster<typename intrinsic_type<T1>::type>::template cast_op_type<T1>(),
|
||||||
|
second.operator typename type_caster<typename intrinsic_type<T2>::type>::template cast_op_type<T2>());
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
type_caster<typename intrinsic_type<T1>::type> first;
|
type_caster<typename intrinsic_type<T1>::type> first;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user