Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/56871 |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 template<typename T> constexpr int foo(T); | |
5 template<> int foo(int); | |
6 template<> int foo(int); // { dg-message "previous declaration 'int foo" } | |
7 template<> constexpr int foo(int); // { dg-error "redeclaration 'constexpr int foo" } | |
8 | |
9 template<typename T> int bar(T); | |
10 template<> constexpr int bar(int); | |
11 template<> constexpr int bar(int); // { dg-message "previous declaration 'constexpr int bar" } | |
12 template<> int bar(int); // { dg-error "redeclaration 'int bar" } |