blob: ef7ac6b4842aa448961e11da0b6ce8b760f1663f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// PR c++/48296
// { dg-options -std=c++0x }
struct X
{
constexpr X() { }
constexpr X f(X x) { return x; }
constexpr X g(X x);
};
constexpr X X::g(X x) { return x; }
struct Y
{
Y() { }
constexpr Y f(Y y); // { dg-error "not a literal type" }
static constexpr Y g(Y y) {} // { dg-error "constexpr" }
};
|