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 // <array>
11 
12 // template <size_t I, class T, size_t N> T&& get(array<T, N>&& a);
13 
14 #include <array>
15 #include <memory>
16 #include <utility>
17 #include <cassert>
18 
19 int main()
20 {
21 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
22     {
23         typedef std::unique_ptr<double> T;
24         typedef std::array<T, 1> C;
25         C c = {std::unique_ptr<double>(new double(3.5))};
26         T t = std::get<0>(std::move(c));
27         assert(*t == 3.5);
28     }
29 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
30 }
31