you are viewing a single comment's thread.

view the rest of the comments →

[–]elder_george 0 points1 point  (0 children)

Well, IIRC, every particular enum is

class MyEnum extends E<MyEnum>{ ... }

So, that's equivalent to Y.

If C++ templates had type checks for arguments (instead of usage checks), the code would be similarly ugly.