#ifndef WEBGPU_ENUM_CLASS_BITMASKS_H_
#define WEBGPU_ENUM_CLASS_BITMASKS_H_
#include <type_traits>
#define WGPU_IMPORT_BITMASK_OPERATORS …
namespace wgpu {
template <typename T>
struct IsWGPUBitmask { … };
template <typename T, typename Enable = void>
struct LowerBitmask { … };
LowerBitmask<T, typename std::enable_if<IsWGPUBitmask<T>::enable>::type>;
template <typename T>
struct BoolConvertible { … };
LowerBitmask<BoolConvertible<T>>;
template <
typename T1,
typename T2,
typename = typename std::enable_if<LowerBitmask<T1>::enable && LowerBitmask<T2>::enable>::type>
constexpr BoolConvertible<typename LowerBitmask<T1>::type> operator|(T1 left, T2 right) { … }
template <
typename T1,
typename T2,
typename = typename std::enable_if<LowerBitmask<T1>::enable && LowerBitmask<T2>::enable>::type>
constexpr BoolConvertible<typename LowerBitmask<T1>::type> operator&(T1 left, T2 right) { … }
template <
typename T1,
typename T2,
typename = typename std::enable_if<LowerBitmask<T1>::enable && LowerBitmask<T2>::enable>::type>
constexpr BoolConvertible<typename LowerBitmask<T1>::type> operator^(T1 left, T2 right) { … }
template <typename T1>
constexpr BoolConvertible<typename LowerBitmask<T1>::type> operator~(T1 t) { … }
template <
typename T,
typename T2,
typename = typename std::enable_if<IsWGPUBitmask<T>::enable && LowerBitmask<T2>::enable>::type>
constexpr T& operator&=(T& l, T2 right) { … }
template <
typename T,
typename T2,
typename = typename std::enable_if<IsWGPUBitmask<T>::enable && LowerBitmask<T2>::enable>::type>
constexpr T& operator|=(T& l, T2 right) { … }
template <
typename T,
typename T2,
typename = typename std::enable_if<IsWGPUBitmask<T>::enable && LowerBitmask<T2>::enable>::type>
constexpr T& operator^=(T& l, T2 right) { … }
template <typename T>
constexpr bool HasZeroOrOneBits(T value) { … }
}
#endif