Dan Albert | 287553d | 2017-02-16 10:47:51 -0800 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // <memory> |
| 11 | |
| 12 | // default_delete |
| 13 | |
| 14 | // Test that default_delete<T[]> does not have a working converting constructor |
| 15 | |
| 16 | #include <memory> |
| 17 | #include <cassert> |
| 18 | |
| 19 | struct A |
| 20 | { |
| 21 | }; |
| 22 | |
| 23 | struct B |
| 24 | : public A |
| 25 | { |
| 26 | }; |
| 27 | |
| 28 | int main() |
| 29 | { |
| 30 | std::default_delete<B[]> d2; |
| 31 | std::default_delete<A[]> d1 = d2; |
| 32 | } |