Alright, this should fix the GCC build errors! Everything should work as advertised. A Sol for the Mun: go, go!

This commit is contained in:
ThePhD 2013-12-02 21:39:21 -05:00
parent 86b16dc61b
commit 45000177c3
2 changed files with 14 additions and 13 deletions

View File

@ -32,10 +32,8 @@ private:
template <typename... Ret>
std::tuple<Ret...> call( types<Ret...>, std::size_t n ) {
typedef typename std::decay<decltype(std::make_tuple<Ret...>)>::type maketuple_t;
maketuple_t m = &std::make_tuple<Ret...>;
lua_pcall( state( ), n, sizeof...( Ret ), 0 );
return stack::pop_call( state( ), m, types<Ret...>() );
return stack::pop_call( state( ), std::make_tuple<Ret...>, types<Ret...>( ) );
}
template <typename Ret>

View File

@ -159,14 +159,17 @@ inline void push(lua_State* L, indices<I...>, const T& tuplen) {
void(swallow{ '\0', (sol::stack::push(L, std::get<I>(tuplen)), '\0')... });
}
template<class T, class F, class... Vs>
auto ltr_pop(T&&, F&& f, types<>, Vs&&... vs)
template<typename F, typename... Vs>
auto ltr_pop( lua_State*, F&& f, types<>, Vs&&... vs )
-> decltype( f( std::forward<Vs>( vs )... ) ) {
return f( std::forward<Vs>( vs )... );
}
// take head, produce value from it, pass after other values
template<class F, class Head, class... Tail, class... Vs>
template<typename F, typename Head, typename... Vs>
auto ltr_pop( lua_State* L, F&& f, types<Head>, Vs&&... vs )
-> decltype( ltr_pop( L, std::forward<F>( f ), types<>( ), std::forward<Vs>( vs )..., pop<Head>( L ) ) ) {
return ltr_pop( L, std::forward<F>( f ), types<>( ), std::forward<Vs>( vs )..., pop<Head>( L ) );
}
template<typename F, typename Head, typename... Tail, typename... Vs>
auto ltr_pop( lua_State* L, F&& f, types<Head, Tail...>, Vs&&... vs )
-> decltype( ltr_pop( L, std::forward<F>( f ), types<Tail...>( ), std::forward<Vs>( vs )..., pop<Head>( L ) ) ) {
return ltr_pop( L, std::forward<F>( f ), types<Tail...>( ), std::forward<Vs>( vs )..., pop<Head>( L ) );