Subject: Re: [std-proposals] Operator functions to fix ADL
From: Jason McKesson (jmckesson_at_[hidden])
Date: 2020-10-13 13:20:48
On Tue, Oct 13, 2020 at 10:57 AM Dusan Jovanovic (DBJ) via
Std-Proposals <std-proposals_at_[hidden]> wrote:
> A.O.D. has written: -- I'd be interested to see a compiler patch to warn whenever "ADL lookup occurred, on a non-operator, and ADL found a best-matching candidate which would not have been found by regular unqualified lookup." It couldn't be used in production because approximately every C++ program depends on ADL somewhere. But it could give us a sense of the magnitude of the issue. --
> Why not just going further: -fno-adl
> That would certainly "rock the boat". In my not-a-compiler-writer naivete, I might think, contrary to A.O.D. (gasp!) a lot of code will work unbroken with that switch.? Especially that silent not-minority not using std lib.
And what about the rest of the C++ world? C++ is bigger than you think.
And what C++ *doesn't* need is more bifurcation between groups of
developers. We don't need to have more code that doesn't compile if
you don't use the right parts of the language, or is incompatible with
other code just because they decided to use a part of the language you
Lastly, if all of this code supposedly works without ADL... why would
you want to forbid it? What's the point of making incompatible parts
of the language if it doesn't actually buy anyone anything?
STD-PROPOSALS list run by firstname.lastname@example.org
Standard Proposals Archives on Google Groups