<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 10, 2010, at 8:45 PM, Nico Weber wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<div><br></div><div>cat > <a href="http://out.mm/">out.mm</a> << EOF</div><div><div>class A {</div><div> public:</div><div>   void operator<<(bool n);</div><div>   void operator<<(const void* p);</div>
<div>};</div><div><br></div><div>int f() {</div><div>  id b;</div><div>  A a;</div><div>  a << b;</div><div>}</div></div><div>EOF</div><div><br></div><div>g++ -c <a href="http://out.mm/">out.mm</a>  #works</div><div>
clang++ -c <a href="http://out.mm/">out.mm</a></div><div><div>test.mm:13:5: error: use of overloaded operator '<<' is ambiguous</div><div>  a << b;</div><div>  ~ ^  ~</div><div>test.mm:6:9: note: candidate function</div>
<div>   void operator<<(bool n);</div><div>        ^</div><div>test.mm:7:9: note: candidate function</div><div>   void operator<<(const void* p);</div><div>        ^</div><div>1 error generated.</div></div><div>
<br></div><div>Is this intentional? Should I file a bug?</div></blockquote><div><br></div>This is not intentional, but you should not file a bug because I have fixed it (in r105817).  Thanks for the report!</div><div><br></div><div>John.</div></body></html>