autoPriv=reinterpret_cast<void(Private::*)(char*)>(&Private::check);// expected-error{{'check' is a private member of 'access_control::Private'}} expected-note@6{{implicitly declared private here}}
autoPrivStatic=reinterpret_cast<void(*)(char*)>(&Private::checkStatic);// expected-error{{'checkStatic' is a private member of 'access_control::Private'}} expected-note@9{{implicitly declared private here}}
autoProt=reinterpret_cast<void(Protected::*)(char*)>(&Protected::check);// expected-error{{'check' is a protected member of 'access_control::Protected'}} expected-note@19{{declared protected here}}
autoProtStatic=reinterpret_cast<void(*)(char*)>(&Protected::checkStatic);// expected-error{{'checkStatic' is a protected member of 'access_control::Protected'}} expected-note@22{{declared protected here}}
}
namespaceunavailable{
// Ensure that we check that the function can be called
callMem(&Foo::bar,Foo());// expected-error{{'bar' is a private member of 'template_deduction::Foo'}} expected-note@-8{{implicitly declared private here}}
call(&Foo::staticBar);// expected-error{{'staticBar' is a private member of 'template_deduction::Foo'}} expected-note@-6{{implicitly declared private here}}