voidf(intn)__attribute__((enable_if(n==0,"chosen when 'n' is zero")));
voidf(intn)__attribute__((enable_if(n==1,"chosen when 'n' is one")));// expected-note{{member declaration nearly matches}} expected-note{{candidate disabled: chosen when 'n' is one}}
voidhidden_by_argument_conversion(Incompleten,intm=0)__attribute__((enable_if(m==10,"chosen when 'm' is ten")));
Incompletehidden_by_incomplete_return_value(intn=0)__attribute__((enable_if(n==10,"chosen when 'n' is ten")));// expected-note{{'hidden_by_incomplete_return_value' declared here}}
operatorlong()__attribute__((enable_if(true,"chosen on your platform")));
operatorint()__attribute__((enable_if(false,"chosen on other platform")));
operatorfp()__attribute__((enable_if(false,"never enabled"))){returnsurrogate;}// expected-note{{conversion candidate of type 'int (*)(int)'}} // FIXME: the message is not displayed
};
voidX::f(intn)__attribute__((enable_if(n==0,"chosen when 'n' is zero")))// expected-note{{member declaration nearly matches}} expected-note{{candidate disabled: chosen when 'n' is zero}}
{
}
voidX::f(intn)__attribute__((enable_if(n==2,"chosen when 'n' is two")))// expected-error{{out-of-line definition of 'f' does not match any declaration in 'X'}} expected-note{{candidate disabled: chosen when 'n' is two}}
voiddefault_argument(intn,intm=0)__attribute__((enable_if(m==0,"chosen when 'm' is zero")));// expected-note{{candidate disabled: chosen when 'm' is zero}}
voiddefault_argument_promotion(intn,intm=Int(0))__attribute__((enable_if(m==0,"chosen when 'm' is zero")));// expected-note{{candidate disabled: chosen when 'm' is zero}}
template<typenameT>voidtypedep(Tt)__attribute__((enable_if(t,"")));// expected-note{{candidate disabled:}} expected-error{{value of type 'Nothing' is not contextually convertible to 'bool'}}
int(*p)(int)=ovlConflict;// expected-error{{address of overloaded function 'ovlConflict' is ambiguous}} expected-note@191{{candidate function}} expected-note@192{{candidate function}}
int(*p2)(int)=&ovlConflict;// expected-error{{address of overloaded function 'ovlConflict' is ambiguous}} expected-note@191{{candidate function}} expected-note@192{{candidate function}}
int(*a)(int);
a=ovlConflict;// expected-error{{assigning to 'int (*)(int)' from incompatible type '<overloaded function type>'}} expected-note@191{{candidate function}} expected-note@192{{candidate function}}
a=&ovlConflict;// expected-error{{assigning to 'int (*)(int)' from incompatible type '<overloaded function type>'}} expected-note@191{{candidate function}} expected-note@192{{candidate function}}
int(*p)(int)=templatedBar<int>;// expected-error{{address of overloaded function 'templatedBar' does not match required type 'int (int)'}} expected-note@214{{candidate function made ineligible by enable_if}}
int(*p2)(int)=&templatedBar<int>;// expected-error{{address of overloaded function 'templatedBar' does not match required type 'int (int)'}} expected-note@214{{candidate function made ineligible by enable_if}}
int(*a)(int);
a=templatedBar<int>;// expected-error{{assigning to 'int (*)(int)' from incompatible type '<overloaded function type>'}} expected-note@214{{candidate function made ineligible by enable_if}}
a=&templatedBar<int>;// expected-error{{assigning to 'int (*)(int)' from incompatible type '<overloaded function type>'}} expected-note@214{{candidate function made ineligible by enable_if}}
int(*p)(int)=templatedConflict<int>;// expected-error{{address of overloaded function 'templatedConflict' is ambiguous}} expected-note@224{{candidate function made ineligible by enable_if}} expected-note@226{{candidate function}} expected-note@228{{candidate function}}
int(*p0)(int)=&templatedConflict<int>;// expected-error{{address of overloaded function 'templatedConflict' is ambiguous}} expected-note@224{{candidate function made ineligible by enable_if}} expected-note@226{{candidate function}} expected-note@228{{candidate function}}
int(*a)(int);
a=templatedConflict<int>;// expected-error{{assigning to 'int (*)(int)' from incompatible type '<overloaded function type>'}} expected-note@226{{candidate function}} expected-note@228{{candidate function}}
a=&templatedConflict<int>;// expected-error{{assigning to 'int (*)(int)' from incompatible type '<overloaded function type>'}} expected-note@226{{candidate function}} expected-note@228{{candidate function}}