mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-05 15:55:45 +00:00
20 lines
378 B
C++
20 lines
378 B
C++
|
#ifndef OPENMW_COMPONENTS_MISC_META_H
|
||
|
#define OPENMW_COMPONENTS_MISC_META_H
|
||
|
|
||
|
#include <tuple>
|
||
|
#include <type_traits>
|
||
|
|
||
|
namespace Misc
|
||
|
{
|
||
|
template <class T, class Tuple>
|
||
|
struct TupleHasType;
|
||
|
|
||
|
template <class T, class... Args>
|
||
|
struct TupleHasType<T, std::tuple<Args...>>
|
||
|
{
|
||
|
static constexpr bool value = (std::is_same_v<T, Args> || ...);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|