Consider the following demonstrative program.
#include <iostream>
int main()
{
typedef float T;
0.f.T::~T();
}
This program is compiled by Microsoft Visual Studio Community 2019
.
But clang
and gcc
issue an error like this
prog.cc:7:5: error: unable to find numeric literal operator 'operator""f.T'
7 | 0.f.T::~T();
| ^~~~~
If to write the expression like ( 0.f ).T::~T()
then all three compilers compile the program.
So a question arises: is this record 0.f.T::~T()
syntactically valid? And if not, then what syntactical rule is broken?