mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-16 21:57:55 +00:00
Remove incorrectly placed template
keywords to resolve clang 19.0.0 dev errors (see https://github.com/pybind/pybind11/pull/5175). (#5176)
This commit is contained in:
parent
0c1a5aa479
commit
1cafcee3b1
@ -218,7 +218,7 @@ void construct(value_and_holder &v_h, std::unique_ptr<Cpp<Class>, D> &&unq_ptr,
|
|||||||
// trampoline Python object alive. For types that don't inherit from enable_shared_from_this
|
// trampoline Python object alive. For types that don't inherit from enable_shared_from_this
|
||||||
// it does not matter if void_cast_raw_ptr is true or false, therefore it's not necessary
|
// it does not matter if void_cast_raw_ptr is true or false, therefore it's not necessary
|
||||||
// to also inspect the type.
|
// to also inspect the type.
|
||||||
auto smhldr = type_caster<Cpp<Class>>::template smart_holder_from_unique_ptr(
|
auto smhldr = type_caster<Cpp<Class>>::smart_holder_from_unique_ptr(
|
||||||
std::move(unq_ptr), /*void_cast_raw_ptr*/ Class::has_alias && is_alias<Class>(ptr));
|
std::move(unq_ptr), /*void_cast_raw_ptr*/ Class::has_alias && is_alias<Class>(ptr));
|
||||||
v_h.value_ptr() = ptr;
|
v_h.value_ptr() = ptr;
|
||||||
v_h.type->init_instance(v_h.inst, &smhldr);
|
v_h.type->init_instance(v_h.inst, &smhldr);
|
||||||
@ -233,7 +233,7 @@ void construct(value_and_holder &v_h,
|
|||||||
bool /*need_alias*/) {
|
bool /*need_alias*/) {
|
||||||
auto *ptr = unq_ptr.get();
|
auto *ptr = unq_ptr.get();
|
||||||
no_nullptr(ptr);
|
no_nullptr(ptr);
|
||||||
auto smhldr = type_caster<Alias<Class>>::template smart_holder_from_unique_ptr(
|
auto smhldr = type_caster<Alias<Class>>::smart_holder_from_unique_ptr(
|
||||||
std::move(unq_ptr), /*void_cast_raw_ptr*/ true);
|
std::move(unq_ptr), /*void_cast_raw_ptr*/ true);
|
||||||
v_h.value_ptr() = ptr;
|
v_h.value_ptr() = ptr;
|
||||||
v_h.type->init_instance(v_h.inst, &smhldr);
|
v_h.type->init_instance(v_h.inst, &smhldr);
|
||||||
@ -250,7 +250,7 @@ void construct(value_and_holder &v_h, std::shared_ptr<Cpp<Class>> &&shd_ptr, boo
|
|||||||
throw type_error("pybind11::init(): construction failed: returned std::shared_ptr pointee "
|
throw type_error("pybind11::init(): construction failed: returned std::shared_ptr pointee "
|
||||||
"is not an alias instance");
|
"is not an alias instance");
|
||||||
}
|
}
|
||||||
auto smhldr = type_caster<Cpp<Class>>::template smart_holder_from_shared_ptr(shd_ptr);
|
auto smhldr = type_caster<Cpp<Class>>::smart_holder_from_shared_ptr(shd_ptr);
|
||||||
v_h.value_ptr() = ptr;
|
v_h.value_ptr() = ptr;
|
||||||
v_h.type->init_instance(v_h.inst, &smhldr);
|
v_h.type->init_instance(v_h.inst, &smhldr);
|
||||||
}
|
}
|
||||||
@ -263,7 +263,7 @@ void construct(value_and_holder &v_h,
|
|||||||
bool /*need_alias*/) {
|
bool /*need_alias*/) {
|
||||||
auto *ptr = shd_ptr.get();
|
auto *ptr = shd_ptr.get();
|
||||||
no_nullptr(ptr);
|
no_nullptr(ptr);
|
||||||
auto smhldr = type_caster<Alias<Class>>::template smart_holder_from_shared_ptr(shd_ptr);
|
auto smhldr = type_caster<Alias<Class>>::smart_holder_from_shared_ptr(shd_ptr);
|
||||||
v_h.value_ptr() = ptr;
|
v_h.value_ptr() = ptr;
|
||||||
v_h.type->init_instance(v_h.inst, &smhldr);
|
v_h.type->init_instance(v_h.inst, &smhldr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user