mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 12:56:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			404 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			404 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef OPENMW_COMPONENTS_ESM_DECOMPOSE_H
 | 
						|
#define OPENMW_COMPONENTS_ESM_DECOMPOSE_H
 | 
						|
 | 
						|
namespace ESM
 | 
						|
{
 | 
						|
    template <class T>
 | 
						|
    void decompose(T&& value, const auto& apply) = delete;
 | 
						|
 | 
						|
    std::size_t getCompositeSize(const auto& value)
 | 
						|
    {
 | 
						|
        std::size_t result = 0;
 | 
						|
        decompose(value, [&](const auto&... args) { result = (0 + ... + sizeof(args)); });
 | 
						|
        return result;
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
#endif
 |