
Hi, On Thu, Apr 9, 2009 at 10:17 PM, Stewart, Robert <Robert.Stewart@sig.com> wrote:
Doh! I was too focused on other aspects to think about the need for ADL to find an operator overload. For that to work, of course, the operators must be in namespace std and that's undefined due to 17.4.3.1/1. IOW, I did miss something.
Of course, that means that Scott McMurray's idea is still applicable as an addition to the C++ standard :) But... I have been trying to figure out exactly why "such an overload is legal but useless because it won't be found by ADL". What exactly are the applicable lookup rules here? Simple examples based on Rob's suggestion and adaptations of my own manipulator code do seem to work, and I had the impression that ADL is an extension of unqualified name lookup (but I am also aware, with a rather hazy view, that the lookup rules for templates are a little different). Thanks, Eugene Wee