mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
27 lines
343 B
C++
27 lines
343 B
C++
|
|
enum class EC : int {
|
|
V
|
|
};
|
|
|
|
template<EC X>
|
|
struct IsX {
|
|
static const bool Value = false;
|
|
};
|
|
|
|
template<EC X, bool B = IsX<X>::Value>
|
|
struct DX {
|
|
typedef int Type;
|
|
};
|
|
|
|
template<EC X>
|
|
struct IX {
|
|
static const EC Value = EC::V;
|
|
};
|
|
|
|
template<EC Y>
|
|
void run() {
|
|
const EC y = IX<Y>::Value;
|
|
typedef typename DX<y>::Type T;
|
|
}
|
|
|