-
Notifications
You must be signed in to change notification settings - Fork 14
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
value_ptr and abstract types as an element_type #8
Comments
@flexferrum, just to let you know I've noticed your question, looking at it in sparsely scattered time ;) |
NP. :) |
Also it's good to have type requirements for T in value_ptr. Can it be abstract? Can it be incomplete? Copy-constructable, default-constructable etc. And tests for meeting that requirements as well. UPD: Personally I vote for less possible restrictions. |
Added branch issue-8-abstract. Not making any progress. After 30+ years there's a sense that C++ might perhaps not be for me ;) @flexferrum Do you have an idea how to advance this? |
After trying the hot-fix on local Jinja2Cpp branch I realized that |
Not sure about direct PR. Decided to make issue for discussion. Looks like current implementation doesn't allow to hold abstract types in value_ptr.
Cloner
andDeleters
implies that it should be possible butvalue_or
method breaks this possibility:It implies that
element_type
should be able to construct from arbitrary type. For abstract types that's wrong expectation. What if "hide" value_or method underenable_if
?The text was updated successfully, but these errors were encountered: