Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-initlist3.C
blob: 912cf910ec63c2d24dae07a1edddbc8140818ff1 [
file
] [
log
] [
blame
]
// { dg-do compile { target c++11 } }
#include
<initializer_list>
#define
SA
(
X
)
static_assert
(
X
,#
X
)
constexpr
int
f
(
std
::
initializer_list
<int>
l
)
{
return
l
.
begin
()[
0
];
}
int
main
()
{
constexpr
int
i
=
f
({
42
});
SA
(
i
==
42
);
}