1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00
OpenMW/components/misc/tuplehelpers.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
319 B
C++
Raw Normal View History

2022-09-11 11:18:56 +00:00
#ifndef OPENMW_COMPONENTS_MISC_TUPLEHELPERS_H
#define OPENMW_COMPONENTS_MISC_TUPLEHELPERS_H
2022-09-10 18:25:18 +00:00
#include <tuple>
namespace Misc
{
template <typename TupleType, typename Callable>
void tupleForEach(TupleType& tuple, Callable&& f)
{
std::apply([&f](auto&... x) { (f(x), ...); }, tuple);
}
}
#endif