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