#include <type_traits>
#include <vector>
template<template<typename...> typename T, typename... U>
struct is_specialization_of : std::false_type{};
template<template<typename...> typename T, typename... U>
struct is_specialization_of<T, T<U...>> : std::true_type{};
template<typename T, typename U = int>
struct test{};
// (1) ok
static_assert(is_specialization_of<test, test<int>>::value);
template<typename T>
using alias = test<T>;
// (2) fails
static_assert(is_specialization_of<test, alias<int>>::value);
int main()
{
}
I2luY2x1ZGUgPHR5cGVfdHJhaXRzPgojaW5jbHVkZSA8dmVjdG9yPgoKdGVtcGxhdGU8dGVtcGxhdGU8dHlwZW5hbWUuLi4+IHR5cGVuYW1lIFQsIHR5cGVuYW1lLi4uIFU+CnN0cnVjdCBpc19zcGVjaWFsaXphdGlvbl9vZiA6IHN0ZDo6ZmFsc2VfdHlwZXt9OwoKdGVtcGxhdGU8dGVtcGxhdGU8dHlwZW5hbWUuLi4+IHR5cGVuYW1lIFQsIHR5cGVuYW1lLi4uIFU+CnN0cnVjdCBpc19zcGVjaWFsaXphdGlvbl9vZjxULCBUPFUuLi4+PiA6IHN0ZDo6dHJ1ZV90eXBle307Cgp0ZW1wbGF0ZTx0eXBlbmFtZSBULCB0eXBlbmFtZSBVID0gaW50PgpzdHJ1Y3QgdGVzdHt9OwoKLy8gKDEpIG9rCnN0YXRpY19hc3NlcnQoaXNfc3BlY2lhbGl6YXRpb25fb2Y8dGVzdCwgdGVzdDxpbnQ+Pjo6dmFsdWUpOwoKdGVtcGxhdGU8dHlwZW5hbWUgVD4KdXNpbmcgYWxpYXMgPSB0ZXN0PFQ+OwoKLy8gKDIpIGZhaWxzCnN0YXRpY19hc3NlcnQoaXNfc3BlY2lhbGl6YXRpb25fb2Y8dGVzdCwgYWxpYXM8aW50Pj46OnZhbHVlKTsKCmludCBtYWluKCkKewp9