// Copyright (C) 2013 Jérôme Leclercq // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp // http://stackoverflow.com/questions/687490/c0x-how-do-i-expand-a-tuple-into-variadic-template-function-arguments // Merci à Ryan "FullMetal Alchemist" Lahfa // Merci aussi à Freedom de siteduzero.com #include template struct NzImplTupleUnpack { template void operator()(F func, const std::tuple& t, Args&... args) { NzImplTupleUnpack()(func, t, std::get(t), args...); } }; template<> struct NzImplTupleUnpack<0> { template void operator()(F func, const std::tuple&, Args&... args) { func(args...); } }; template void NzUnpackTuple(F func, const std::tuple& t) { NzImplTupleUnpack()(func, t); } #include