tuple: add debugging 'ignore' function

used to pass off parameter packs when debugging to avoid unused argument
warnings.
This commit is contained in:
Danny Robson 2017-05-18 18:21:25 +10:00
parent 167aae1d1e
commit f0dd072d16

View File

@ -163,6 +163,24 @@ namespace util::tuple {
>::type...
> type;
};
///////////////////////////////////////////////////////////////////////////
// do nothing with a set of parameters.
//
// useful for temporarily silencing unused argument warnings in parameter
// packs.
void
ignore (void)
{ ; }
//-------------------------------------------------------------------------
template <typename T, typename ...Args>
void
ignore (T, Args ...args)
{
ignore (std::forward<Args> (args)...);
};
}