| 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 |
|
| 10 |
// UNSUPPORTED: c++03 |
| 11 |
|
| 12 |
// Tuples of smart pointers; based on bug #18350 |
| 13 |
// auto_ptr doesn't have a copy constructor that takes a const &, but tuple does. |
| 14 |
|
| 15 |
#include <tuple> |
| 16 |
#include <memory> |
| 17 |
|
| 18 |
#include "test_macros.h" |
| 19 |
|
| 20 |
int main(int, char**) { |
| 21 |
{ |
| 22 |
std::tuple<std::unique_ptr<char>> up; |
| 23 |
std::tuple<std::shared_ptr<char>> sp; |
| 24 |
std::tuple<std::weak_ptr <char>> wp; |
| 25 |
} |
| 26 |
{ |
| 27 |
std::tuple<std::unique_ptr<char[]>> up; |
| 28 |
std::tuple<std::shared_ptr<char[]>> sp; |
| 29 |
std::tuple<std::weak_ptr <char[]>> wp; |
| 30 |
} |
| 31 |
// Smart pointers of type 'T[N]' are not tested here since they are not |
| 32 |
// supported by the standard nor by libc++'s implementation. |
| 33 |
// See https://reviews.llvm.org/D21320 for more information. |
| 34 |
|
| 35 |
return 0; |
| 36 |
} |