26 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s2 3void f();4 5// Test typeof(expr) canonicalization6template<typename T, T N>7void f0(T x, decltype(f(N, x)) y) { } // expected-note{{previous}}8 9template<typename T, T N>10void f0(T x, decltype((f)(N, x)) y) { }11 12template<typename U, U M>13void f0(U u, decltype(f(M, u))) { } // expected-error{{redefinition}}14 15// PR12438: Test sizeof...() canonicalization16template<int> struct N {};17 18template<typename...T>19N<sizeof...(T)> f1() {} // expected-note{{previous}}20 21template<typename, typename...T>22N<sizeof...(T)> f1() {}23 24template<class...U>25N<sizeof...(U)> f1() {} // expected-error{{redefinition}}26