shaneasd
shaneasd
Also seemingly related: [NR.2: Don’t insist to have only a single return-statement in a function](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#nr2-dont-insist-to-have-only-a-single-return-statement-in-a-function) (the example more so than the title)
I'm not sure I agree with your continue example. I find the "bad" code easier to read. I think you could make an argument for special_flag_5 being a special case...
I don't think passing by reference is always fine. It's not just a question of cost but complexity. When I pass something by reference I don't know how long I...
The way I read it the whole point of that example is to show what a bad implementation would look like. However I do think that meaning is difficult to...
https://en.wikipedia.org/wiki/Luma_(video) gives the equation for luma from RGB as Y=0.2126 R + 0.7152G + 0.0722B This is one of many examples that calculate some sort of human perceived brightness from...
Although I acknowledge this is a problem with no good solution, I'd like to point out that having to suppress warnings inline can make the code probably harder to read...
I use not_null for function signatures to indicate the contract of the function (this parameter must not be null, the return value will not be null). However somewhere along the...
@johnmcfarlane I think we may be arguing slightly different things. I can definitely see a use case for a contract check which triggers in debug but not in release (or...
Sounds like we're in agreement about the problem and possible solutions. Ideally I'd like the editors to state a definitive position before considering something so drastic as forking though. Currently...
Is it reasonable to assume that gsl::span and std::span do the same thing? My first instinct was yes. However it occurs to me that there's a lot of precedent for...