Repository navigation
An operator() for Type? #6330
fbleibel-g
started this conversation in
Ideas
Replies: 1 comment
|
My first reaction is that this sacrifices readability too much; from a casual scan, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I have recently come across code of the form:
I thought that it might be nice and concise to offer casting directly from the Type itself. Something like this would avoid repetition and keep the code more readable:
This doesn't address other variants of casting (saturating_cast, ...others?), but I thought that it might be nice to be able to express casting from a local Type in this manner.
All reactions