Files
codeql/cpp/ql/test/library-tests/templates/CPP-204/test.cpp
2018-08-02 17:53:23 +01:00

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;
}