This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] libstdc++/69240 generic operator!= for random number distributions


On 14/01/16 20:41 +0000, Jonathan Wakely wrote:
On 14/01/16 20:57 +0100, Marc Glisse wrote:
Once you constrain, you could even use 'std' as the associated namespace ;-)

True! And std is already an associated namespace of the standard
distributions, so we wouldn't be making ADL look anywhere additional.


There is still an advantage to keeping the overloads isolated in their
own namespaces: they won't be shown as candidates when users try to
use == or != for types that aren't EqualityComparable. The errors for
the trivial testcase in PR69240 run to 365 lines, because of all the
possible operator== overloads that fail to match.

If the <random> operators are in a separate namespace they won't add
to the vast number of overloads in namespace std already.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]