-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugger friendly? Inheritance? #66
Comments
Subclassing was my first thought, but I'd need to repeat the constructors and conversion operator in each derived class, which is unappealing. Also _value is then declared in the base class, not the user-facing class, which some debuggers hide with an extra level of hierarchy. The debugger shows an integral value for the _value member in my example above because it is defined as _underlying (uint8_t), not _enum. FWIW, I ended up modifying your simpler CodeProject version:
So now I can say:
Where Crtp is defined elsewhere as:
This makes my original desired syntax possible.. whew. This has been a fun vacation in Meta-Uber-Land, but now it's time to get back to work! ;) |
Great, I'm glad this worked. We may be able to define |
Hi.. fantastic work! Very impressive. :)
Just a couple of unsolicited thoughts:
It would be wonderful if I could do something like:
Looking briefly at the code makes me think this would be difficult. :(
I think I'll play around with modifying your earlier, much simpler version on CodeProject. :)
Again, great work!
The text was updated successfully, but these errors were encountered: