modify table push operations

This commit is contained in:
ThePhD 2017-08-07 14:54:17 -04:00
parent c8728af5b5
commit c4b13b2b73
2 changed files with 8 additions and 8 deletions

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2017-08-07 18:22:38.155280 UTC // Generated 2017-08-07 18:54:03.754890 UTC
// This header was generated with sol v2.18.0 (revision 6eaa277) // This header was generated with sol v2.18.0 (revision c8728af)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP #ifndef SOL_SINGLE_INCLUDE_HPP
@ -7295,7 +7295,7 @@ namespace sol {
}; };
template<typename T> template<typename T>
struct pusher<as_table_t<T>, std::enable_if_t<is_container<meta::unqualified_t<T>>::value>> { struct pusher<as_table_t<T>, std::enable_if_t<is_container<meta::unwrap_unqualified_t<T>>::value>> {
static int push(lua_State* L, const T& tablecont) { static int push(lua_State* L, const T& tablecont) {
return push(meta::has_key_value_pair<meta::unqualified_t<std::remove_pointer_t<T>>>(), L, tablecont); return push(meta::has_key_value_pair<meta::unqualified_t<std::remove_pointer_t<T>>>(), L, tablecont);
} }
@ -7312,7 +7312,7 @@ namespace sol {
static int push(std::false_type, lua_State* L, const T& tablecont) { static int push(std::false_type, lua_State* L, const T& tablecont) {
auto& cont = detail::deref(detail::unwrap(tablecont)); auto& cont = detail::deref(detail::unwrap(tablecont));
lua_createtable(L, stack_detail::get_size_hint(tablecont), 0); lua_createtable(L, stack_detail::get_size_hint(cont), 0);
int tableindex = lua_gettop(L); int tableindex = lua_gettop(L);
std::size_t index = 1; std::size_t index = 1;
for (const auto& i : cont) { for (const auto& i : cont) {
@ -7348,7 +7348,7 @@ namespace sol {
}; };
template<typename T> template<typename T>
struct pusher<as_table_t<T>, std::enable_if_t<!is_container<meta::unqualified_t<T>>::value>> { struct pusher<as_table_t<T>, std::enable_if_t<!is_container<meta::unwrap_unqualified_t<T>>::value>> {
static int push(lua_State* L, const T& v) { static int push(lua_State* L, const T& v) {
return stack::push(L, v); return stack::push(L, v);
} }

View File

@ -218,7 +218,7 @@ namespace sol {
}; };
template<typename T> template<typename T>
struct pusher<as_table_t<T>, std::enable_if_t<is_container<meta::unqualified_t<T>>::value>> { struct pusher<as_table_t<T>, std::enable_if_t<is_container<meta::unwrap_unqualified_t<T>>::value>> {
static int push(lua_State* L, const T& tablecont) { static int push(lua_State* L, const T& tablecont) {
return push(meta::has_key_value_pair<meta::unqualified_t<std::remove_pointer_t<T>>>(), L, tablecont); return push(meta::has_key_value_pair<meta::unqualified_t<std::remove_pointer_t<T>>>(), L, tablecont);
} }
@ -235,7 +235,7 @@ namespace sol {
static int push(std::false_type, lua_State* L, const T& tablecont) { static int push(std::false_type, lua_State* L, const T& tablecont) {
auto& cont = detail::deref(detail::unwrap(tablecont)); auto& cont = detail::deref(detail::unwrap(tablecont));
lua_createtable(L, stack_detail::get_size_hint(tablecont), 0); lua_createtable(L, stack_detail::get_size_hint(cont), 0);
int tableindex = lua_gettop(L); int tableindex = lua_gettop(L);
std::size_t index = 1; std::size_t index = 1;
for (const auto& i : cont) { for (const auto& i : cont) {
@ -271,7 +271,7 @@ namespace sol {
}; };
template<typename T> template<typename T>
struct pusher<as_table_t<T>, std::enable_if_t<!is_container<meta::unqualified_t<T>>::value>> { struct pusher<as_table_t<T>, std::enable_if_t<!is_container<meta::unwrap_unqualified_t<T>>::value>> {
static int push(lua_State* L, const T& v) { static int push(lua_State* L, const T& v) {
return stack::push(L, v); return stack::push(L, v);
} }