brintos

brintos / llvm-project-archived public Read only

0
0
Text · 578 B · 1a3732d Raw
14 lines · cpp
1// RUN: %clang_cc1 -std=c++1z -verify %s2 3void f() noexcept;4void (&r)() = f;5void (&s)() noexcept = r; // expected-error {{cannot bind}}6 7void (&cond1)() noexcept = true ? r : f; // expected-error {{cannot bind}}8void (&cond2)() noexcept = true ? f : r; // expected-error {{cannot bind}}9// FIXME: Strictly, the rules in p4 don't allow this, because the operand types10// are not of the same type other than cv-qualifiers, but we consider that to11// be a defect, and instead allow reference-compatible types here.12void (&cond3)() = true ? r : f;13void (&cond4)() = true ? f : r;14