Debian Codegraph @

libstdc++-v3/testsuite/20_util/unique_ptr/101236.cc

raw
1 // { dg-do compile { target c++11 } }
2 #include <memory>
3
4 struct Incomplete;
5 struct pr101236
6 {
7 // The standard says "T shall be a complete type" for unique_ptr<T[], D>
8 // so this is a GCC extension.
9 std::unique_ptr<Incomplete[]> p;
10
11 Incomplete& f() { return p[0]; }
12 };
13 struct Incomplete { };