1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // template <size_t I, class T, size_t N> T&& get(array<T, N>&& a);
20 // std::array is explicitly allowed to be initialized with A a = { init-list };.
21 // Disable the missing braces warning for this reason.
22 #include "test_macros.h"
23 #include "disable_missing_braces_warning.h"
29 typedef std::unique_ptr
<double> T
;
30 typedef std::array
<T
, 1> C
;
31 C c
= {std::unique_ptr
<double>(new double(3.5))};
32 T t
= std::get
<0>(std::move(c
));