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 f()10void f() 11 { 12 X< 1> a; 13 X<-1> b; 14 X<+1> c; 15 } 16 g()17void g() 18 { 19 X< n> a; 20 X<-n> b; 21 X<+n> c; 22 } 23