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}}
staticvoids(intn)__attribute__((enable_if(n==0,"chosen when 'n' is zero")));// expected-note2{{candidate disabled: chosen when 'n' is zero}}
voidconflict(intn)__attribute__((enable_if(n+n==10,"chosen when 'n' is five")));// expected-note{{candidate function}}
voidconflict(intn)__attribute__((enable_if(n*2==10,"chosen when 'n' is five")));// expected-note{{candidate function}}
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}}
__attribute__((deprecated))constexprintold(){return0;}// expected-note2{{'old' has been explicitly marked deprecated here}}
voiddeprec1(inti)__attribute__((enable_if(old()==0,"chosen when old() is zero")));// expected-warning{{'old' is deprecated}}
voiddeprec2(inti)__attribute__((enable_if(old()==0,"chosen when old() is zero")));// expected-warning{{'old' is deprecated}}
voidoverloaded(int);
voidoverloaded(long);
structNothing{};
template<typenameT>voidtypedep(Tt)__attribute__((enable_if(t,"")));// expected-note{{candidate disabled:}} expected-error{{value of type 'Nothing' is not contextually convertible to 'bool'}}