1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 // GCC 5 does not evaluate static assertions dependent on a template parameter.
10 // UNSUPPORTED: gcc-5
11
12 // <memory>
13
14 // default_delete
15
16 // Test that default_delete<T[]>'s operator() requires a complete type
17
18 #include <memory>
19 #include <cassert>
20
21 struct A;
22
main(int,char **)23 int main(int, char**)
24 {
25 std::default_delete<A[]> d;
26 A* p = 0;
27 d(p);
28
29 return 0;
30 }
31