cplusplus/fundamentals-ts

ostream_joiner should use addressof

jwakely opened this issue · 5 comments

[iterator.ostream.joiner.cons] uses &s but that could cause an ADL lookup in the associated namespace of the traits type, it should be std::addressof(s) (in both constructors).

This is a very small behavior change. @mclow, should it go through the LWG?

Yes.

Let me rephrase. If you wan to just make the change in v2, I wouldn't bother with LWG. If you want someone to consider the change, then I think that LWG would be a better place than LEWG.

Yeah, I was too brief: I'm not certain this is editorial, but if both you and @jwakely think it doesn't need LWG review, I'm happy to take it straight into v2.

I agree there's a slight change in behaviour, but I'm positive that doing ADL lookup for operator& was not an intended feature :-) During recent wording reviews in LWG we've replaced a few & with addressof where it matters, but don't catch them all.