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++98, 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 int main(int, char**) { 19 { 20 std::tuple<std::unique_ptr<char>> up; 21 std::tuple<std::shared_ptr<char>> sp; 22 std::tuple<std::weak_ptr <char>> wp; 23 } 24 { 25 std::tuple<std::unique_ptr<char[]>> up; 26 std::tuple<std::shared_ptr<char[]>> sp; 27 std::tuple<std::weak_ptr <char[]>> wp; 28 } 29 // Smart pointers of type 'T[N]' are not tested here since they are not 30 // supported by the standard nor by libc++'s implementation. 31 // See https://reviews.llvm.org/D21320 for more information. 32 33 return 0; 34 } 35