]>
Commit | Line | Data |
---|---|---|
1 | // Copyright Louis Dionne 2013-2017 | |
2 | // Distributed under the Boost Software License, Version 1.0. | |
3 | // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | |
4 | ||
5 | #include <boost/hana/tuple.hpp> | |
6 | ||
7 | #include <memory> | |
8 | namespace hana = boost::hana; | |
9 | ||
10 | ||
11 | // Tuples of smart pointers; based on LLVM bug #18350 | |
12 | // auto_ptr doesn't have a copy constructor that takes a const &, but tuple does. | |
13 | int main() { | |
14 | { | |
15 | hana::tuple<std::unique_ptr<char>> up; | |
16 | hana::tuple<std::shared_ptr<char>> sp; | |
17 | hana::tuple<std::weak_ptr <char>> wp; | |
18 | } | |
19 | { | |
20 | hana::tuple<std::unique_ptr<char[]>> up; | |
21 | hana::tuple<std::shared_ptr<char[]>> sp; | |
22 | hana::tuple<std::weak_ptr <char[]>> wp; | |
23 | } | |
24 | { | |
25 | hana::tuple<std::unique_ptr<char[5]>> up; | |
26 | hana::tuple<std::shared_ptr<char[5]>> sp; | |
27 | hana::tuple<std::weak_ptr <char[5]>> wp; | |
28 | } | |
29 | } |