3 ms·
> When you pass it to execlp, it just gets pushed through as a bit-pattern No, it doesn't. It goes through a proper conversion to a pointer. > [passing nullpt
by jjnoakes 10y ago
> When you pass it to execlp, it just gets pushed through as a bit-pattern
No, it doesn't. It goes through a proper conversion to a pointer.
> [passing nullptr and getting 0 out of va_arg is] not required behaviour by the standard
Yes, it is. See C++11 and C++14 standards, section 5.2.2 paragraph 7.
You've been all over this thread shouting at people about how wrong they were, and even in your correction you are still mistaken. Please try to refrain from that in the future; lots of people reading these threads are going to be very confused about what is technically correct here, and I'm not willing to go reply to all of them.
Perhaps some edits and/or deletes are appropriate?
- CJefferson 10y agoYou are right, I learnt this stuff in a C++0x draft, and it has been notably improved. I'm not discussing C++ minutiae in future, I've learnt my lesson. Ycombinator allows neither edits or deletions after a short amount of time it seems.
- jjnoakes 10y ago> I learnt this stuff in a C++0x draft, and it has been notably improved. I guess the lesson is: don't yell at people if you aren't up-to-date on what you are yelling about :)
- CJefferson 10y agoYes, yes, I agree. In my defence, I thought I was up to date. I did know all about how C++ and varargs interact, I was just unaware there was a specific addition to varargs just for nullptr, and I'll be honest it didn't even occur to me to check! While I agree it's a sensible feature, it's also (for me) been the final straw on giving up on understanding C++ (not using, but understanding...)