mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
16 lines
317 B
C++
16 lines
317 B
C++
![]() |
#ifndef OPENMW_COMPONENTS_MISC_TUPLEHELPER_H
|
||
|
#define OPENMW_COMPONENTS_MISC_TUPLEHELPER_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
|