summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/rv-lvalue-req.C
blob: a8f424df003a2fda85942652cfb87ae4ccb0c98e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-options -std=c++0x }

template <class T> T&& declval();

int main()
{
  &declval<int>();		        // { dg-error "xvalue" }
  declval<int>() = declval<int>();	// { dg-error "xvalue" }
  declval<int>()++;			// { dg-error "xvalue" }
  --declval<int>();			// { dg-error "xvalue" }
  declval<int>() += 1;			// { dg-error "xvalue" }
}