Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
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
);
}