C++ 11에서 lua 바인딩을 생성합니다. 난 variadic 템플릿에서 각 유형을 처리하고 싶습니다.Variadic 템플릿의 개별 유형 액세스
Params...
을 사용하는 것을 제외하고 나는 이것과 비슷한 것을 할 수 있다고 생각 했었습니다. 가변 내부 함수 매개 변수처럼 내부의 모든 단일 유형을 나타냅니다.
template <class T, typename ReturnType, typename... Params>
struct MemberFunctionWrapper <ReturnType (T::*) (Params...)>
{
static int CFunctionWrapper (lua_State* luaState)
{
for(int i = 0; i < sizeof...(Params); i++)
{
//I want to get the next type, not all of the types
CheckLuaValue<Params...>();
//Do other stuff
}
}
};
어떻게하면됩니까?
huh? . . . . . . –