"Inconnu" <
[email protected]>
(forwarding from clc++ to csc++ as a better fit group)
OK. Then I have 2 questions more. 1) Isn't it too hard a task for a
compiler to resolve such an ambiguity? Just imagine what it must do.
2) How to define empty final class X in the namespace N?
That is a good question. I add another one. Let's just have
struct S final {};
That supposed to be definiton of S, right?
Now let's insert before that
struct S;
Does that change the interpretation?
For these cases disambiguation can be done toward object by removing the
class-key. I guess 2.11p2
was formed that way to guard the old code and not change meaning if someone
used the new contextual keywords as identifiers. But this seem to create
counter-intuitive thing like with the 'this really is a function
declaration' madness.
For this situation was the intent to use stuff between {} as decision-maker?
And force tricks like
struct S final {public:};
?
If so, I'd suggest at least put in a note about that at the proper place in
the standard text.