#include <iostream>
template<class T>
struct Either {
template<class U>
struct Or {};
};
template<typename U,template<class> class T>
struct specialize_me_2 {};
template<class T>
struct specialize_me_2<T,Either<T>::template Or> {
static const int foo = 3;
};
int main() {
std::cout << specialize_me_2<int,Either<int>::Or >::foo; // Does compile
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGU8Y2xhc3MgVD4Kc3RydWN0IEVpdGhlciB7CiAgICB0ZW1wbGF0ZTxjbGFzcyBVPgogICAgc3RydWN0IE9yIHt9Owp9OwoKCnRlbXBsYXRlPHR5cGVuYW1lIFUsdGVtcGxhdGU8Y2xhc3M+IGNsYXNzIFQ+CnN0cnVjdCBzcGVjaWFsaXplX21lXzIge307Cgp0ZW1wbGF0ZTxjbGFzcyBUPgpzdHJ1Y3Qgc3BlY2lhbGl6ZV9tZV8yPFQsRWl0aGVyPFQ+Ojp0ZW1wbGF0ZSBPcj4gewogICAgc3RhdGljIGNvbnN0IGludCBmb28gPSAzOwp9OwoKCmludCBtYWluKCkgewoKICAgIHN0ZDo6Y291dCA8PCBzcGVjaWFsaXplX21lXzI8aW50LEVpdGhlcjxpbnQ+OjpPciA+Ojpmb287IC8vIERvZXMgY29tcGlsZQogIAp9