15a83710eSEric Fiselier //===----------------------------------------------------------------------===// 25a83710eSEric Fiselier // 357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 65a83710eSEric Fiselier // 75a83710eSEric Fiselier //===----------------------------------------------------------------------===// 85a83710eSEric Fiselier // 90a52cd79SEric Fiselier 10*31cbe0f2SLouis Dionne // UNSUPPORTED: c++03 110a52cd79SEric Fiselier 125a83710eSEric Fiselier // Tuples of smart pointers; based on bug #18350 135a83710eSEric Fiselier // auto_ptr doesn't have a copy constructor that takes a const &, but tuple does. 145a83710eSEric Fiselier 155a83710eSEric Fiselier #include <tuple> 165a83710eSEric Fiselier #include <memory> 175a83710eSEric Fiselier 187fc6a556SMarshall Clow #include "test_macros.h" 197fc6a556SMarshall Clow main(int,char **)202df59c50SJF Bastienint main(int, char**) { 215a83710eSEric Fiselier { 225a83710eSEric Fiselier std::tuple<std::unique_ptr<char>> up; 235a83710eSEric Fiselier std::tuple<std::shared_ptr<char>> sp; 245a83710eSEric Fiselier std::tuple<std::weak_ptr <char>> wp; 255a83710eSEric Fiselier } 265a83710eSEric Fiselier { 275a83710eSEric Fiselier std::tuple<std::unique_ptr<char[]>> up; 285a83710eSEric Fiselier std::tuple<std::shared_ptr<char[]>> sp; 295a83710eSEric Fiselier std::tuple<std::weak_ptr <char[]>> wp; 305a83710eSEric Fiselier } 311ff954f7SEric Fiselier // Smart pointers of type 'T[N]' are not tested here since they are not 321ff954f7SEric Fiselier // supported by the standard nor by libc++'s implementation. 33ade32237SStephan T. Lavavej // See https://reviews.llvm.org/D21320 for more information. 342df59c50SJF Bastien 352df59c50SJF Bastien return 0; 365a83710eSEric Fiselier } 37