Home | History | Annotate | Download | only in tuple.general
      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 
     11 // UNSUPPORTED: c++98, c++03
     12 
     13 //  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 
     19 int 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;
     24     }
     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;
     29     }
     30     // Smart pointers of type 'T[N]' are not tested here since they are not
     31     // supported by the standard nor by libc++'s implementation.
     32     // See https://reviews.llvm.org/D21320 for more information.
     33 }
     34