| 1 |
//===----------------------------------------------------------------------===// |
| 2 |
// |
| 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 |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
// Make sure the rvalue overload of operator<< isn't part of the overload set |
| 10 |
// when the type is not output streamable into a lvalue stream. |
| 11 |
|
| 12 |
#include <ostream> |
| 13 |
#include <utility> |
| 14 |
|
| 15 |
struct Foo { }; |
| 16 |
|
| 17 |
using X = decltype(std::declval<std::ostream>() << std::declval<Foo const&>()); // expected-error {{invalid operands to binary expression}} |