blob: 811dfc03ba1125966c0ccd18388f7f5cdf89181e [file] [log] [blame]
Marshall Clow85d3e7a2014-04-26 05:19:48 +00001//===----------------------------------------------------------------------===//
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//
Eric Fiselier0a52cd72015-02-19 02:10:42 +000010
11// UNSUPPORTED: c++98, c++03
12
Marshall Clow85d3e7a2014-04-26 05:19:48 +000013// Tuples of smart pointers; based on bug #18350
14// auto_ptr doesn't have a copy constructor that takes a const &, but tuple does.
15
16#include <tuple>
17#include <memory>
18
19int main () {
20 {
21 std::tuple<std::unique_ptr<char>> up;
22 std::tuple<std::shared_ptr<char>> sp;
23 std::tuple<std::weak_ptr <char>> wp;
Marshall Clow85d3e7a2014-04-26 05:19:48 +000024 }
25 {
26 std::tuple<std::unique_ptr<char[]>> up;
27 std::tuple<std::shared_ptr<char[]>> sp;
28 std::tuple<std::weak_ptr <char[]>> wp;
Marshall Clow85d3e7a2014-04-26 05:19:48 +000029 }
Eric Fiselier1ff954f2016-06-15 19:41:52 +000030 // Smart pointers of type 'T[N]' are not tested here since they are not
31 // supported by the standard nor by libc++'s implementation.
Stephan T. Lavavejade32232017-08-05 00:44:24 +000032 // See https://reviews.llvm.org/D21320 for more information.
Eric Fiselier46fb2b92016-06-22 01:23:51 +000033}