//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03 // // template struct pair // template // typename tuple_element >::type&& // get(pair&&); #include #include #include int main(int, char**) { { typedef std::pair, short> P; P p(std::unique_ptr(new int(3)), static_cast(4)); std::unique_ptr ptr = std::get<0>(std::move(p)); assert(*ptr == 3); } return 0; }