diff --git a/.gitignore b/.gitignore index af96791f..43403670 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .vscode -build +build* diff --git a/src/rttr/detail/type/type_register.h b/src/rttr/detail/type/type_register.h index 56e78ba6..62e668dd 100644 --- a/src/rttr/detail/type/type_register.h +++ b/src/rttr/detail/type/type_register.h @@ -128,7 +128,7 @@ class RTTR_API type_register private: - friend class type; + friend class rttr::type; template friend class class_; diff --git a/src/rttr/detail/variant/variant_data_policy.h b/src/rttr/detail/variant/variant_data_policy.h index 8e2a081f..7644d1d2 100644 --- a/src/rttr/detail/variant/variant_data_policy.h +++ b/src/rttr/detail/variant/variant_data_policy.h @@ -230,14 +230,25 @@ enable_if_t::value && !is_dereferenceable::value, argument> ge ///////////////////////////////////////////////////////////////////////////////////////// template -enable_if_t::value && - is_dereferenceable::value, argument> get_reference_argument(T& value) -{ +enable_if_t< !is_wrapper::value && is_dereferenceable::value && + !std::is_void::type>::value, argument> get_reference_argument(T& value) +{ return argument(*value); } ///////////////////////////////////////////////////////////////////////////////////////// +template +enable_if_t::value && is_dereferenceable::value && + std::is_void::type>::value, argument> get_reference_argument(T& value) +{ + // This is specifically for the scenario when T is void*. And since we cannot actually do anything + // meaningful with a void* variable we will just return an empty argument. + return argument(); +} + +///////////////////////////////////////////////////////////////////////////////////////// + template enable_if_t::value && !is_dereferenceable::value, argument> get_reference_argument(T& value)