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