
31 Aug
2011
31 Aug
'11
5:21 p.m.
2011/8/31 Gordon Woodhull <gordon@woodhull.com>
On Aug 31, 2011, at 12:47 PM, Roman Perepelitsa < roman.perepelitsa@gmail.com> wrote:
The rule I follow is that operator+(x, x) can be provided only by the author of x. If xdoesn't have such operator, third parties can't add one. The same applies to swap and other functions that are expected to be found by ADL and form the type's interface.
If you were defining operator+(X,Y) you'd have the same problem. Any customization point involving two or more types seems to suffer this problem.
All I'm saying is that customization points requiring two UDTs are bad. I would say that a library that promotes them should't be part of boost. Roman Perepelitsa.