I'm pretty surprise that, while this is well-formed:
int main()
{
using T = int;
T t;
(void)t;
t.~T();
}
that isn't:
int main()
{
int t;
(void)t;
t.~int();
}
However, that is well-formed again:
int main()
{
int t;
(void)t;
using T = int;
t.~T();
}
I was expecting that the using
declaration won't make any difference at all. Why cannot I write the pseudodestructor call using the real type name if the call is possible after all? What bullet in the standard does it forbid that?