Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/nullptr23.C

raw
1 // PR c++/50361
2 // { dg-do compile { target c++11 } }
3
4 #include <initializer_list>
5
6 struct Foo
7 {
8 Foo(std::initializer_list<Foo>) { };
9
10 template<class T> Foo(T t) { T u(t); }
11
12 private:
13 union Data
14 {
15 Data() : null(nullptr) {}
16
17 std::nullptr_t null;
18 } u_;
19 };
20
21 int main()
22 {
23 Foo f = { {} };
24 }