
11 Jul
2005
11 Jul
'05
11:30 p.m.
David Abrahams wrote:
but in my opinion, "implementation defined" doesn't equal "nonportable" in this particular case. (Alignment problems notwithstanding.)
There's "nonportable according to the standard" and "nonportable in practice." This one is only the former, it's true. But why write something that might turn out to be nonportable somewhere when we can do something that the standard guarantees?
Because it's clearer, it (arguably) matches the intent of the standard (see 9.2/17), and because deducing that T* -> void* -> char* is guaranteed to work correctly is nontrivial. I suspect that 5.2.10 doesn't give semantics to T* -> char* only because "everyone knows" how this conversion is supposed to work. It's probably a defect.