Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-initlist2.C
blob: 65a7036ef0f59a2c683889ae77b0b7f9e05cf5c9 [
file
] [
log
] [
blame
]
// { dg-do compile { target c++11 } }
#include
<initializer_list>
constexpr
auto
list
=
{
1
,
2
,
3
,
4
};
#define
SA
(
X
)
static_assert
(
X
,
#X)
SA
(
list
.
size
()
==
4
);
SA
(
list
.
begin
()[
2
]
==
3
);
SA
(
list
.
end
()[-
1
]
==
4
);