Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/nontype11.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 // { dg-do compile } |
2 // Origin: <fsm at robots dot ox dot ac dot uk> | |
3 // PR c++/18354: Unary plus should not be wrapped in NON_LVALUE_EXPR | |
4 | |
5 template <int N> | |
6 struct X { }; | |
7 | |
8 const int n = 1; | |
9 | |
10 void f() | |
11 { | |
12 X< 1> a; | |
13 X<-1> b; | |
14 X<+1> c; | |
15 } | |
16 | |
17 void g() | |
18 { | |
19 X< n> a; | |
20 X<-n> b; | |
21 X<+n> c; | |
22 } |