//===----------------------------------------------------------------------===// // // 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 // //===----------------------------------------------------------------------===// // // template class tuple; // template // const typename tuple_element >::type&& // get(const tuple&& t); // UNSUPPORTED: c++03 #include template void cref(T const&) {} template void cref(T const&&) = delete; std::tuple const tup4() { return std::make_tuple(4); } void f() { // LWG2485: tuple should not open a hole in the type system, get() should // imitate [expr.ref]'s rules for accessing data members { cref(std::get<0>(tup4())); // expected-error {{call to deleted function 'cref'}} } }