Sign in
gnu
/
gcc
/
refs/heads/devel/c++-contracts
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-local4.C
blob: 647b5dcd7cd5a8beaec5077ad2eba900238f8d8a [
file
] [
log
] [
blame
]
// { dg-do compile { target c++14 } }
struct
A
{
int
i
;
constexpr
A
(
int
i
):
i
(
i
)
{};
};
const
A a
=
42
;
constexpr
int
f
()
{
const
int
j
=
a
.
i
;
// { dg-error "'a'" }
return
j
;
}
static_assert
(
f
()
==
42
,
""
);
// { dg-error "" }