mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-29 10:26:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			319 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			15 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
 |