//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template struct pair // template // typename tuple_element >::type&& // get(pair&&); #include #include #include int main() { #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair, short> P; P p(std::unique_ptr(new int(3)), 4); std::unique_ptr ptr = std::get<0>(std::move(p)); assert(*ptr == 3); } #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES }