OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-noexcept4.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options -std=c++0x }
2
// A call is noexcept if it is a valid subexpression of a constant
3
// expression, even if it is not itself a constant expression.
4
 
5
#define SA(X) static_assert(X,#X)
6
 
7
constexpr const int* f(const int *p) { return p; }
8
 
9
int main()
10
{
11
  constexpr int i = 42;
12
  SA(noexcept(*f(&i)));
13
  SA(noexcept(f(&i)));
14
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.