You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/components/misc/tuplehelpers.hpp

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