[ub] Justification for < not being a total order on pointers?

Daniel Krügler daniel.kruegler at gmail.com
Tue Aug 27 21:23:16 CEST 2013


2013/8/27 Jeffrey Yasskin <jyasskin at google.com>:
> I think that particular implementation is forbidden. The rule in
> [expr.reinterpret.cast]p4 is: "A pointer can be explicitly converted
> to any integral type large enough to hold it. The mapping function is
> implementation-defined." Since it's a "function", it has to map a
> domain value to only one value in the range.

I'm not sure that the standard is very clear here in which sense the
term "function" or "mapping function" can be interpreted. One could
argue that the language is (intentionally?) fuzzy here.

- Daniel


More information about the ub mailing list