Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.dg / cpp0x / constexpr-specialization.C
blob80f56a19615a890b9b220cb885a62b608abadb90
1 // PR c++/56871
2 // { dg-do compile { target c++11 } }
4 template<typename T> constexpr int foo(T);
5 template<> int foo(int);
6 template<> int foo(int);            // { dg-error "previous" }
7 template<> constexpr int foo(int);  // { dg-error "redeclaration" }
9 template<typename T> int bar(T);
10 template<> constexpr int bar(int);
11 template<> constexpr int bar(int);  // { dg-error "previous" }
12 template<> int bar(int);            // { dg-error "redeclaration" }