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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-default-ctor.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
 
3
struct A {
4
  int i;
5
  constexpr A():i(42) { };
6
};
7
struct B: A { };
8
constexpr int f(B b) { return b.i; }
9
 
10
struct C { C(); };             // { dg-message "calls non-constexpr" }
11
struct D: C { };               // { dg-message "no constexpr constructor" }
12
constexpr int g(D d) { return 42; } // { dg-error "invalid type" }

powered by: WebSVN 2.1.0

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