simont |
Sat 2019-03-09 11:35 |
Hmmm. I was going to say that the C ?: operator doesn't generate an lvalue, even if both arguments are. But I'd forgotten that it does in C++!
So yes, you're right: the same language in which I just failed to do this in the sensible way clearly can do this equivocation at some level. Hmmm.
(But then, it's also perfectly possible that there is some way to do it with templates, using one of those fiddly modern things like std::enable_if . I deliberately didn't say it was impossible, only that the obvious approach didn't work.) |
|