Created
August 13, 2013 10:25
-
-
Save vittorioromeo/6219901 to your computer and use it in GitHub Desktop.
failed tuple iteration tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<Idx TIdx, Idx TSize, typename T, typename... TArgs, typename Func> typename std::enable_if<(TSize == 1)>::type mapHelper(Obj& mObj, const std::tuple<TArgs...>& mTuple) | |
{ | |
set(mObj, std::get<0>(std::get<TIdx>(mTuple)), std::get<1>(std::get<TIdx>(mTuple))); | |
} | |
template<Idx TIdx, Idx TSize, typename T, typename... TArgs, typename Func> typename std::enable_if<(TSize >= 1)>::type mapHelper(Obj& mObj, const std::tuple<TArgs...>& mTuple) | |
{ | |
set(mObj, std::get<0>(std::get<TIdx>(mTuple)), std::get<1>(std::get<TIdx>(mTuple))); | |
mapHelper<TIdx + 1, TSize - 1, T>(mObj, mTuple); | |
} | |
template<typename T, typename... TArgs> inline static void map(Obj& mObj, const std::tuple<TArgs...>& mTuple) { Internal::mapHelper<0, sizeof...(TArgs), T>(mObj, mTuple); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment