mirror of https://github.com/OpenMW/openmw.git
Rename HasMember to TupleHasType and move code into misc/meta.hpp
parent
1f2c473242
commit
8f7703d5c8
@ -0,0 +1,19 @@
|
||||
#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
|
Loading…
Reference in New Issue