Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/rv-lvalue-req.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
2 | 2 |
3 template <class T> T&& declval(); | 3 template <class T> T&& declval(); |
4 | 4 |
5 int main() | 5 int main() |
6 { | 6 { |
7 &declval<int>(); // { dg-error "xvalue" } | 7 &declval<int>(); // { dg-error "rvalue" } |
8 declval<int>() = declval<int>(); // { dg-error "xvalue" } | 8 declval<int>() = declval<int>(); // { dg-error "rvalue" } |
9 declval<int>()++; // { dg-error "xvalue" } | 9 declval<int>()++; // { dg-error "rvalue" } |
10 --declval<int>(); // { dg-error "xvalue" } | 10 --declval<int>(); // { dg-error "rvalue" } |
11 declval<int>() += 1; // { dg-error "xvalue" } | 11 declval<int>() += 1; // { dg-error "rvalue" } |
12 } | 12 } |