// standard library implementors; therefore, we need the xvalue check here.
ICS.Standard.DirectBinding =
S.getLangOpts().CPlusPlus11 ||
- (InitCategory.isPRValue() && !T2->isRecordType());
+ !(InitCategory.isPRValue() || T2->isRecordType());
ICS.Standard.IsLvalueReference = !isRValRef;
ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
ICS.Standard.BindsToRvalue = InitCategory.isRValue();
}
namespace PR20218 {
- void f(void (*const &)()); // expected-note{{candidate}}
- void f(void (&&)()) = delete; // expected-note{{candidate}} expected-warning 2{{extension}}
- void g(void (&&)()) = delete; // expected-note{{candidate}} expected-warning 2{{extension}}
- void g(void (*const &)()); // expected-note{{candidate}}
+ void f(void (*const &)()); // expected-note 2{{candidate}}
+ void f(void (&&)()) = delete; // expected-note 2{{candidate}} expected-warning 2{{extension}}
+ void g(void (&&)()) = delete; // expected-note 2{{candidate}} expected-warning 2{{extension}}
+ void g(void (*const &)()); // expected-note 2{{candidate}}
void x();
typedef void (&fr)();
void h() {
f(x); // expected-error {{ambiguous}}
g(x); // expected-error {{ambiguous}}
-
- // OK! These ones try to copy-initialize a temporary of the reference's
- // underlying type, which only works for the pointer case and not for the
- // reference case.
- f(y);
- g(y);
+ f(y); // expected-error {{ambiguous}}
+ g(y); // expected-error {{ambiguous}}
}
}