mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
16 lines
319 B
C++
16 lines
319 B
C++
#ifndef OPENMW_COMPONENTS_MISC_TUPLEHELPERS_H
|
|
#define OPENMW_COMPONENTS_MISC_TUPLEHELPERS_H
|
|
|
|
#include <tuple>
|
|
|
|
namespace Misc
|
|
{
|
|
template <typename TupleType, typename Callable>
|
|
void tupleForEach(TupleType& tuple, Callable&& f)
|
|
{
|
|
std::apply([&f](auto&... x) { (f(x), ...); }, tuple);
|
|
}
|
|
}
|
|
|
|
#endif
|