int main()
{
using cell = std::pair<void *, cell *>;
return 0;
}
According to the C++ 20 Standard (6.4.2 Point of declaration), p.3 ) «The point of declaration of an alias or alias template immediately follows the defining-type-id to which the alias refers»
So in the above program cell within the defining-type-id refers to the typedef id cell declared in the global namespace.
So just to write «error» for this line in the C++ Standard is not enough. Either this example should be excluded or appended with an explanation why there is an error.
With best regards
(Vlad from Moscow)