blob: f56a6fd779e370e5d2e9ca17228246654d889240 [file] [log] [blame]
Howard Hinnant3e519522010-05-11 19:42:16 +00001//===----------------------------------------------------------------------===//
2//
Chandler Carruth57b08b02019-01-19 10:56:40 +00003// 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
Howard Hinnant3e519522010-05-11 19:42:16 +00006//
7//===----------------------------------------------------------------------===//
8
9// <utility>
10
11// template <class T> typename add_rvalue_reference<T>::type declval() noexcept;
12
13#include <utility>
14#include <type_traits>
15
Eric Fiselierabd52ca2015-07-28 07:31:50 +000016#include "test_macros.h"
17
Howard Hinnant3e519522010-05-11 19:42:16 +000018class A
19{
20 A(const A&);
21 A& operator=(const A&);
22};
23
JF Bastien2df59c52019-02-04 20:31:13 +000024int main(int, char**)
Howard Hinnant3e519522010-05-11 19:42:16 +000025{
Howard Hinnant3e519522010-05-11 19:42:16 +000026 static_assert((std::is_same<decltype(std::declval<A>()), A&&>::value), "");
JF Bastien2df59c52019-02-04 20:31:13 +000027
28 return 0;
Howard Hinnant3e519522010-05-11 19:42:16 +000029}