7 ms·
I still don't get it. If it can't tell that the cmp_once is a constant expression why can it tell that cmp is a constant expression? EDIT: I think I get it. I
by jstanley 9y ago
I still don't get it.
If it can't tell that the cmp_once is a constant expression why can it tell that cmp is a constant expression?
EDIT: I think I get it. In the event that the arguments are constant, something about the typeof business prevents it from being constant, so that's no good if required in a context where a constant is required. But, when not required to be a constant expression, you want to enforce single-evaluation of the arguments, so then cmp_once is used.
- loeg 9y agoI think it's the ({ }) bit (or perhaps the typeofs) that turns it from a constant expression to a constant value, but I'm not really sure. But yeah, something about cmp_once makes it the wrong kind of syntax.