Pure clang-format change (applied to original type_caster_generic::cast).

This commit is contained in:
Ralf W. Grosse-Kunstleve 2021-01-12 20:05:20 -08:00
parent ee6d15647d
commit 6294eb26e5
1 changed files with 13 additions and 13 deletions

View File

@ -190,8 +190,9 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
// type_caster_base END // type_caster_base END
// Originally type_caster_generic::cast. // Originally type_caster_generic::cast.
// clang-format off PYBIND11_NOINLINE static handle cast(const void *_src,
PYBIND11_NOINLINE static handle cast(const void *_src, return_value_policy policy, handle parent, return_value_policy policy,
handle parent,
const detail::type_info *tinfo, const detail::type_info *tinfo,
void *(*copy_constructor)(const void *), void *(*copy_constructor)(const void *),
void *(*move_constructor)(const void *), void *(*move_constructor)(const void *),
@ -239,8 +240,8 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
#else #else
std::string type_name(tinfo->cpptype->name()); std::string type_name(tinfo->cpptype->name());
detail::clean_type_id(type_name); detail::clean_type_id(type_name);
throw cast_error("return_value_policy = copy, but type " + throw cast_error("return_value_policy = copy, but type " + type_name
type_name + " is non-copyable!"); + " is non-copyable!");
#endif #endif
} }
wrapper->owned = true; wrapper->owned = true;
@ -259,8 +260,8 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
#else #else
std::string type_name(tinfo->cpptype->name()); std::string type_name(tinfo->cpptype->name());
detail::clean_type_id(type_name); detail::clean_type_id(type_name);
throw cast_error("return_value_policy = move, but type " + throw cast_error("return_value_policy = move, but type " + type_name
type_name + " is neither movable nor copyable!"); + " is neither movable nor copyable!");
#endif #endif
} }
wrapper->owned = true; wrapper->owned = true;
@ -280,7 +281,6 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
return inst.release(); return inst.release();
} }
// clang-format on
}; };
template <> template <>