[SUGGESTION] unsafe_narrow is not a good name for forced upcasts. #630
Replies: 6 comments
|
I call this |
|
Yes, that is also possible. |
|
By the way, |
|
Thanks for pointing this out. I knew, that this can also be seen the other way round. I will start using it in terms of the type system and not the functionality. |
|
|
|
Ok, |
Uh oh!
There was an error while loading. Please reload this page.
If you have e.g. expression templates, then the upcast to the implementing class needs to be done with
unsafe_narrow.Maybe an alias of
unsafe_narrowlikeunsafe_cast, 'unsafe_pointer_cast` or something like that could be introduced.Example: https://cpp2.godbolt.org/z/jb1MY3Mcq
All reactions