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 {
|
namespace detail {
|
||||||
template<typename T, std::size_t... I>
|
template<typename T, std::size_t... I>
|
||||||
inline void push(lua_State* L, indices<I...>, const T& tuplen) {
|
inline void push(lua_State* L, indices<I...>, const T& tuplen) {
|
||||||
using swallow = char[];
|
using swallow = char[ 1 + sizeof...(I) ];
|
||||||
void(swallow{'\0', (sol::stack::push(L, std::get<I>(tuplen)), '\0')... });
|
swallow {'\0', (sol::stack::push(L, std::get<I>(tuplen)), '\0')... };
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename F, typename... Vs>
|
template<typename F, typename... Vs>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user