mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
We can avoid unused variable issues entirely and keep MSVC from borking out by explicitly declaring the size of the swallow
declaration. This should make all compilers happy.
This commit is contained in:
parent
009a79606a
commit
c6f6203ab2
|
@ -208,8 +208,8 @@ inline int push_user(lua_State* L, T& item) {
|
|||
namespace detail {
|
||||
template<typename T, std::size_t... I>
|
||||
inline void push(lua_State* L, indices<I...>, const T& tuplen) {
|
||||
using swallow = char[];
|
||||
void(swallow{'\0', (sol::stack::push(L, std::get<I>(tuplen)), '\0')... });
|
||||
using swallow = char[ 1 + sizeof...(I) ];
|
||||
swallow {'\0', (sol::stack::push(L, std::get<I>(tuplen)), '\0')... };
|
||||
}
|
||||
|
||||
template<typename F, typename... Vs>
|
||||
|
|
Loading…
Reference in New Issue
Block a user