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 // Tuples of smart pointers; based on bug #18350 11 // auto_ptr doesn't have a copy constructor that takes a const &, but tuple does. 12 13 #include <tuple> 14 #include <memory> 15 main()16int main () { 17 { 18 std::tuple<std::unique_ptr<char>> up; 19 std::tuple<std::shared_ptr<char>> sp; 20 std::tuple<std::weak_ptr <char>> wp; 21 // std::tuple<std::auto_ptr <char>> ap; 22 } 23 { 24 std::tuple<std::unique_ptr<char[]>> up; 25 std::tuple<std::shared_ptr<char[]>> sp; 26 std::tuple<std::weak_ptr <char[]>> wp; 27 // std::tuple<std::auto_ptr <char[]>> ap; 28 } 29 { 30 std::tuple<std::unique_ptr<char[5]>> up; 31 std::tuple<std::shared_ptr<char[5]>> sp; 32 std::tuple<std::weak_ptr <char[5]>> wp; 33 // std::tuple<std::auto_ptr <char[5]>> ap; 34 } 35 }