mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
push_reference should respect unique usertypes
This commit is contained in:
parent
ec97dac651
commit
6243cbe103
|
@ -20,8 +20,8 @@
|
|||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// This file was generated with a script.
|
||||
// Generated 2016-08-20 01:43:43.958063 UTC
|
||||
// This header was generated with sol v2.11.5 (revision fd657ea)
|
||||
// Generated 2016-08-21 23:23:21.515644 UTC
|
||||
// This header was generated with sol v2.11.5 (revision ec97dac)
|
||||
// https://github.com/ThePhD/sol2
|
||||
|
||||
#ifndef SOL_SINGLE_INCLUDE_HPP
|
||||
|
@ -3426,6 +3426,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> {};
|
||||
|
||||
|
@ -3468,9 +3471,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 {};
|
||||
|
||||
|
@ -3967,7 +3967,8 @@ namespace sol {
|
|||
typedef meta::all<
|
||||
std::is_lvalue_reference<T>,
|
||||
meta::neg<std::is_const<T>>,
|
||||
meta::neg<is_lua_primitive<meta::unqualified_t<T>>>
|
||||
meta::neg<is_lua_primitive<meta::unqualified_t<T>>>,
|
||||
meta::neg<is_unique_usertype<T>>
|
||||
> use_reference_tag;
|
||||
return pusher<std::conditional_t<use_reference_tag::value, detail::as_reference_tag, meta::unqualified_t<T>>>{}.push(L, std::forward<T>(t), std::forward<Args>(args)...);
|
||||
}
|
||||
|
|
|
@ -160,7 +160,8 @@ namespace sol {
|
|||
typedef meta::all<
|
||||
std::is_lvalue_reference<T>,
|
||||
meta::neg<std::is_const<T>>,
|
||||
meta::neg<is_lua_primitive<meta::unqualified_t<T>>>
|
||||
meta::neg<is_lua_primitive<meta::unqualified_t<T>>>,
|
||||
meta::neg<is_unique_usertype<T>>
|
||||
> use_reference_tag;
|
||||
return pusher<std::conditional_t<use_reference_tag::value, detail::as_reference_tag, meta::unqualified_t<T>>>{}.push(L, std::forward<T>(t), std::forward<Args>(args)...);
|
||||
}
|
||||
|
|
|
@ -639,7 +639,6 @@ 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
|
||||
|
|
Loading…
Reference in New Issue
Block a user