mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
push_reference must respect unique_usertypes are primitives
This commit is contained in:
parent
5f036adf48
commit
ec97dac651
|
@ -620,6 +620,9 @@ namespace sol {
|
|||
struct accumulate<C, v, V, T, Args...> : accumulate<C, v + V<T>::value, V, Args...> {};
|
||||
} // detail
|
||||
|
||||
template <typename T>
|
||||
struct is_unique_usertype : std::integral_constant<bool, unique_usertype_traits<T>::value> {};
|
||||
|
||||
template <typename T>
|
||||
struct lua_type_of : detail::lua_type_of<T> {};
|
||||
|
||||
|
@ -636,6 +639,7 @@ namespace sol {
|
|||
struct is_lua_primitive : std::integral_constant<bool,
|
||||
type::userdata != lua_type_of<meta::unqualified_t<T>>::value
|
||||
|| (lua_size<T>::value > 1)
|
||||
|| is_unique_usertype<T>::value
|
||||
|| std::is_base_of<reference, meta::unqualified_t<T>>::value
|
||||
|| std::is_base_of<stack_reference, meta::unqualified_t<T>>::value
|
||||
|| meta::is_specialization_of<std::tuple, meta::unqualified_t<T>>::value
|
||||
|
@ -662,9 +666,6 @@ namespace sol {
|
|||
template <typename T>
|
||||
struct is_proxy_primitive : is_lua_primitive<T> { };
|
||||
|
||||
template <typename T>
|
||||
struct is_unique_usertype : std::integral_constant<bool, unique_usertype_traits<T>::value> {};
|
||||
|
||||
template <typename T>
|
||||
struct is_transparent_argument : std::false_type {};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user