Boost logo

Boost :

Subject: Re: [boost] [concept] EqualityComparable metafunction
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2011-09-14 15:25:28


> I notice (just now) that unary & and [] are absent.  Detection of operator[]
> needs an entirely different mechanism than the above operators, so I
> understand its absence (but maybe it could still be included?).  I'm not
> sure detection of unary operator& would be all that useful most of the time,
> but I'm just wondering what the reasons were for its exclusion.

It needs also a different implementation because & always exists (it
is always possible to get the address of something) , even if not
defined by the user so if you define a less preferred operator (like
in the current implementation), I think it becomes more preferred over
the built-in one. I tried at a time and discovered it was not
possible. I do not remember all details however.

Frédéric


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk