mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 07:15:36 +00:00
missing file
This commit is contained in:
parent
256d8a699a
commit
cdc7864863
1 changed files with 15 additions and 0 deletions
15
components/misc/tuplehelpers.hpp
Normal file
15
components/misc/tuplehelpers.hpp
Normal file
|
@ -0,0 +1,15 @@
|
|||
#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
|
Loading…
Reference in a new issue