Systematically changing std::enable_if back to detail::enable_if_t, effectively…

Systematically changing std::enable_if back to detail::enable_if_t, effectively reverting commit 5d4b6890.
parent 1644a9e7
...@@ -132,7 +132,7 @@ void construct(value_and_holder &v_h, Alias<Class> *alias_ptr, bool) { ...@@ -132,7 +132,7 @@ void construct(value_and_holder &v_h, Alias<Class> *alias_ptr, bool) {
// holder. This also handles types like std::shared_ptr<T> and std::unique_ptr<T> where T is a // holder. This also handles types like std::shared_ptr<T> and std::unique_ptr<T> where T is a
// derived type (through those holder's implicit conversion from derived class holder constructors). // derived type (through those holder's implicit conversion from derived class holder constructors).
template <typename Class, template <typename Class,
typename std::enable_if<!detail::is_smart_holder_type_caster<Cpp<Class>>::value, int>::type = 0> detail::enable_if_t<!detail::is_smart_holder_type_caster<Cpp<Class>>::value, int> = 0>
void construct(value_and_holder &v_h, Holder<Class> holder, bool need_alias) { void construct(value_and_holder &v_h, Holder<Class> holder, bool need_alias) {
auto *ptr = holder_helper<Holder<Class>>::get(holder); auto *ptr = holder_helper<Holder<Class>>::get(holder);
no_nullptr(ptr); no_nullptr(ptr);
...@@ -172,7 +172,7 @@ void construct(value_and_holder &v_h, Alias<Class> &&result, bool) { ...@@ -172,7 +172,7 @@ void construct(value_and_holder &v_h, Alias<Class> &&result, bool) {
//DETAIL/SMART_HOLDER_INIT_H/BEGIN///////////////////////////////////////////////////////////////// //DETAIL/SMART_HOLDER_INIT_H/BEGIN/////////////////////////////////////////////////////////////////
template <typename Class, typename D = std::default_delete<Cpp<Class>>, template <typename Class, typename D = std::default_delete<Cpp<Class>>,
typename std::enable_if<detail::is_smart_holder_type_caster<Cpp<Class>>::value, int>::type = 0> detail::enable_if_t<detail::is_smart_holder_type_caster<Cpp<Class>>::value, int> = 0>
void construct(value_and_holder &v_h, std::unique_ptr<Cpp<Class>, D> &&unq_ptr, bool need_alias) { void construct(value_and_holder &v_h, std::unique_ptr<Cpp<Class>, D> &&unq_ptr, bool need_alias) {
auto *ptr = unq_ptr.get(); auto *ptr = unq_ptr.get();
no_nullptr(ptr); no_nullptr(ptr);
...@@ -188,7 +188,7 @@ void construct(value_and_holder &v_h, std::unique_ptr<Cpp<Class>, D> &&unq_ptr, ...@@ -188,7 +188,7 @@ void construct(value_and_holder &v_h, std::unique_ptr<Cpp<Class>, D> &&unq_ptr,
} }
template <typename Class, template <typename Class,
typename std::enable_if<detail::is_smart_holder_type_caster<Cpp<Class>>::value, int>::type = 0> detail::enable_if_t<detail::is_smart_holder_type_caster<Cpp<Class>>::value, int> = 0>
void construct(value_and_holder &v_h, std::shared_ptr<Cpp<Class>> &&shd_ptr, bool need_alias) { void construct(value_and_holder &v_h, std::shared_ptr<Cpp<Class>> &&shd_ptr, bool need_alias) {
auto *ptr = shd_ptr.get(); auto *ptr = shd_ptr.get();
no_nullptr(ptr); no_nullptr(ptr);
......
...@@ -1544,14 +1544,14 @@ public: ...@@ -1544,14 +1544,14 @@ public:
private: private:
template < template <
typename T = type, typename T = type,
typename std::enable_if<!detail::is_smart_holder_type_caster<T>::value, int>::type = 0> detail::enable_if_t<!detail::is_smart_holder_type_caster<T>::value, int> = 0>
void generic_type_initialize(const detail::type_record &record) { void generic_type_initialize(const detail::type_record &record) {
generic_type::initialize(record, &detail::type_caster_generic::local_load); generic_type::initialize(record, &detail::type_caster_generic::local_load);
} }
template < template <
typename T = type, typename T = type,
typename std::enable_if<detail::is_smart_holder_type_caster<T>::value, int>::type = 0> detail::enable_if_t<detail::is_smart_holder_type_caster<T>::value, int> = 0>
void generic_type_initialize(const detail::type_record &record) { void generic_type_initialize(const detail::type_record &record) {
generic_type::initialize(record, detail::type_caster<T>::get_local_load_function_ptr()); generic_type::initialize(record, detail::type_caster<T>::get_local_load_function_ptr());
} }
...@@ -1602,7 +1602,7 @@ private: ...@@ -1602,7 +1602,7 @@ private:
/// `.owned`, a new holder will be constructed to manage the value pointer. /// `.owned`, a new holder will be constructed to manage the value pointer.
template < template <
typename T = type, typename T = type,
typename std::enable_if<!detail::is_smart_holder_type_caster<T>::value, int>::type = 0> detail::enable_if_t<!detail::is_smart_holder_type_caster<T>::value, int> = 0>
static void init_instance(detail::instance *inst, const void *holder_ptr) { static void init_instance(detail::instance *inst, const void *holder_ptr) {
auto v_h = inst->get_value_and_holder(detail::get_type_info(typeid(type))); auto v_h = inst->get_value_and_holder(detail::get_type_info(typeid(type)));
if (!v_h.instance_registered()) { if (!v_h.instance_registered()) {
...@@ -1614,7 +1614,7 @@ private: ...@@ -1614,7 +1614,7 @@ private:
template < template <
typename T = type, typename T = type,
typename std::enable_if<detail::is_smart_holder_type_caster<T>::value, int>::type = 0> detail::enable_if_t<detail::is_smart_holder_type_caster<T>::value, int> = 0>
static void init_instance(detail::instance *inst, const void *holder_ptr) { static void init_instance(detail::instance *inst, const void *holder_ptr) {
detail::type_caster<T>::template init_instance_for_type<type>(inst, holder_ptr); detail::type_caster<T>::template init_instance_for_type<type>(inst, holder_ptr);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment