fix const-correctness error in detection of is_container type

This commit is contained in:
ThePhD 2016-11-29 12:51:21 -05:00
parent a9a32d1b56
commit 0d43a6f22b
2 changed files with 3 additions and 3 deletions

View File

@ -487,7 +487,7 @@ namespace sol {
}
template<typename T>
struct pusher<T, std::enable_if_t<meta::all<is_container<T>, meta::neg<meta::any<std::is_base_of<reference, meta::unqualified_t<T>>, std::is_base_of<stack_reference, meta::unqualified_t<T>>>>>::value>> {
struct pusher<T, std::enable_if_t<meta::all<is_container<meta::unqualified_t<T>>, meta::neg<meta::any<std::is_base_of<reference, meta::unqualified_t<T>>, std::is_base_of<stack_reference, meta::unqualified_t<T>>>>>::value>> {
static int push(lua_State* L, const T& cont) {
stack_detail::metatable_setup<T> fx(L);
return pusher<detail::as_value_tag<T>>{}.push_fx(L, fx, cont);
@ -500,7 +500,7 @@ namespace sol {
};
template<typename T>
struct pusher<T*, std::enable_if_t<meta::all<is_container<T>, meta::neg<meta::any<std::is_base_of<reference, meta::unqualified_t<T>>, std::is_base_of<stack_reference, meta::unqualified_t<T>>>>>::value>> {
struct pusher<T*, std::enable_if_t<meta::all<is_container<meta::unqualified_t<T>>, meta::neg<meta::any<std::is_base_of<reference, meta::unqualified_t<T>>, std::is_base_of<stack_reference, meta::unqualified_t<T>>>>>::value>> {
static int push(lua_State* L, T* cont) {
stack_detail::metatable_setup<meta::unqualified_t<std::remove_pointer_t<T>>*> fx(L);
return pusher<detail::as_pointer_tag<T>>{}.push_fx(L, fx, cont);

View File

@ -108,7 +108,7 @@ namespace sol {
};
template<typename T>
struct pusher<T*, meta::disable_if_t<meta::all<is_container<T>, meta::neg<meta::any<std::is_base_of<reference, meta::unqualified_t<T>>, std::is_base_of<stack_reference, meta::unqualified_t<T>>>>>::value>> {
struct pusher<T*, meta::disable_if_t<meta::all<is_container<meta::unqualified_t<T>>, meta::neg<meta::any<std::is_base_of<reference, meta::unqualified_t<T>>, std::is_base_of<stack_reference, meta::unqualified_t<T>>>>>::value>> {
template <typename... Args>
static int push(lua_State* L, Args&&... args) {
return pusher<detail::as_pointer_tag<T>>{}.push(L, std::forward<Args>(args)...);