Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
developer notes: updates for C++11 #8177
referenced this pull request
Jun 8, 2016
@laanwj it does make searching for casts and points of concern much easier if you use
The extra safety guarantees are also a boon and pretty excellent for what I would consider safety conscious software.
It also makes casts even uglier, as they should be.
How often do you actually want to search for all casts?
Can you be more specific here? How are casts of primitive types safer using C++ syntax?
I know that pointer casts are safer using C++ syntax and as they are the dangerous kind of casting. I agree with using C++ syntax when casting from const to non const pointers, or one kind of pointer to another, but I don't agree doing so for all cases where primitive types are converted.
I'm also not looking forward to 20 PRs full of 'convert one type of cast to another'. In the time we run this project we've (as far as I know) never had a bug caused by casting. There's no immediate need here. I wrote those developer suggestions all after having found an issue caused by that particular thing. They're not meant for style preferences.
Perhaps I mis-indicated that I was referring only to int style casts, the above was a blanket opinion.
In respect to:
I think this is a good compromise.
In light of:
I too think this may be just another nit-pick enabling PR, but, it is certainly a desirable goal... at some point.