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 // UNSUPPORTED: c++98, c++03 15 16 #include <array> 17 #include <memory> 18 #include <utility> 19 #include <cassert> 20 21 #include "../suppress_array_warnings.h" 22 main()23int main() 24 { 25 26 { 27 typedef std::unique_ptr<double> T; 28 typedef std::array<T, 1> C; 29 C c = {std::unique_ptr<double>(new double(3.5))}; 30 T t = std::get<0>(std::move(c)); 31 assert(*t == 3.5); 32 } 33 } 34