Jul 20 14:06
When constexpr is sent to the compiler, it can make a whole family of guarantees about evaluation simplicity, and optimisation benefits.
Jul 20 14:05
Keep researching. If you care about inline, you should care much more about constexpr.
Jul 20 14:05
@bruno re. constexpr - I think your interpretation is that it only matters for quantities that are compile-time-constant, and that interpretation is wrong.
Jul 20 14:04
true about the runtime params.
Jul 19 16:31
cheers!
Jul 19 16:29
You're welcome. And I disagree with the age take. I think we as professionals need to operate in an atmosphere of hope: change for the better is possible.
Jul 19 16:26
"Two lines when one is enough" without being coloured by other design virtues can lead to some really, really bad code.
Jul 19 16:24
You don't need to change, and gdb is perfectly fine. Users of gdb will thank you if you sanitise your mutations.
Jul 19 16:23
(a) we don't live in that world anymore, and (b) a situation like that is actually much more justification to emphasize a simple execution model.
Jul 19 16:22
Great. I don't think that length of a career is necessarily the best metric for people being effectual; and also, this is less about tools and more about humans.
Jul 19 16:21
Depending on your definition, let's say 1995
Jul 19 16:20
The decrement is a trivial example, but there are more severe examples where being able to easily separate a mutation and the evaluation of its effect are very, very important.
Jul 19 16:19
Then you haven't debugged enough.
Jul 19 16:18
if (!n1)
Jul 19 16:18
--n1;
Jul 19 16:18
And... don't do it. Instead write:
Jul 19 16:18
That's a bad thing to force on a programmer.
Jul 19 16:17
When you step over the line I showed above, it will be executed all at once.
Jul 19 16:17
Whatever, it doesn't matter. Now we're talking about you running gdb in a shell. That's enough.
Jul 19 16:17
if (! --n1)
Jul 19 16:17
When you do a step-over command in GDB, a line like this:
Jul 19 16:16
Great.
Jul 19 16:16
OK great. So.
Jul 19 16:16
Can you do a step-by-step debug of the program?
Jul 19 16:16
Well that's... bad.
Jul 19 16:15
OK. Does it support GDB sessions?
Jul 19 16:14
Are you running the program in an IDE?
Jul 19 16:14
Just like, why it should be done?
Jul 19 16:13
Which part of the mutator predicate comment?
Jul 19 16:13
@bruno constexpr has almost nothing to do with constant values. I strongly encourage you do to some reading on e.g. stackoverflow.com/questions/14116003/…
Jul 19 16:13
No, that's not what I mean; (a) I meant fixing the indexDiag functions and then do the same for isUsable; (b) there being no perceptible difference in execution time doesn't particularly matter; it's still the right thing to do to tell the compiler what's possible and unblock other optimisations upstream.
Jul 19 16:13
Make indexDiag1 and 2 constexpr and then try again.
 

 The 2nd Monitor

General discussion about codereview.stackexchange.com - Welcom...
May 7 02:30
I doubt I'll ever beat this record from my work account
May 7 02:30
Mar 10 13:08
That would have bothered me all day
Mar 10 13:07
Yes. Thank you
Mar 10 12:58
I'm dying here. What's the name for a class of question where it doesn't address the root of the question, is superficial, and tends to produce answers that don't materially improve the situation? aka. "what are you actually asking"
Jan 13 13:23
it's true
Jan 13 13:15
ty!
Jan 13 13:15
yeesh. can you please link the meta?
Jan 13 13:12
My longest-standing gripe with SE is that downvoting is silent and anonymous. I think if it required an accompanying comment the incentive structures could improve.
Jan 13 13:11
and (b) yes, that is weird. My mental threshold for down-voting sits somewhere between "abusive content" and "spam/AI slop"; and if the poster is acting in good faith there's basically never a case where I think a downvote is a useful tool.
Jan 13 13:09
(a) me speaking naively: do mods not have tools to see vote attribution?
Jan 13 13:09
> I've noticed a lot of posts seem to get bizarre -1s. Lots of posts will enter the 2nd with a random -1 which doesn't make much sense. I would ask a CM... but the team seem to take 6-8 weeks to respond.
Jan 13 13:09
Re. @Peilonrayz 's
Dec 24, 2024 02:40
lol. if you aren't seeing the same behaviour, then I will have to blame my family's router
Dec 24, 2024 02:38
:(
Dec 24, 2024 02:36
NS_ERROR_UNKNOWN_HOST
Dec 24, 2024 02:36
for e.g. gravatar.com/avatar/… I get
Dec 24, 2024 02:35
nor ctrl+F5