<div dir="ltr">Thanks Richard. <span style="font-family:arial,sans-serif;font-size:13px">[temp.arg.explicit]</span>p8 uses namespaces in the example which threw me. Anyhow, I'll take a look at adding support for this when in MS mode. I assume it shouldn't be too hard to do...?<div>
<br></div><div style>- Will.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 9 July 2013 22:17, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tue, Jul 9, 2013 at 8:38 AM, Will Wilson <<a href="mailto:will@indefiant.com">will@indefiant.com</a>> wrote:<br>
> Hi All,<br>
><br>
> A quick question regarding correct behaviour:<br>
><br>
> class Vec3 {<br>
> public:<br>
> friend void DoA(Vec3& a) {<br>
> a.m_int = 1;<br>
> }<br>
><br>
> template <const bool B><br>
> friend void DoT(Vec3& a) {<br>
> if (B)<br>
> a.m_int = 2;<br>
> }<br>
> private:<br>
> int m_int;<br>
> };<br>
><br>
> void test_friend_functions_inline() {<br>
> Vec3 a;<br>
> DoA(a);<br>
> DoT<true>(a); // error: use of undeclared identifier 'DoT'<br>
<br>
</div>Lookup of DoT here finds nothing, so this is parsed as a comparison<br>
rather than as a template. EDG rejects this in its strict mode.<br>
<br>
See [temp.arg.explicit]p8, which has almost exactly this case as an example.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><span style="background-color:rgb(255,255,255);color:rgb(68,68,68);font-family:Arial,Helvetica,sans-serif"><b>Indefiant Ltd.</b></span></div><div><font color="#444444" face="Arial, Helvetica, sans-serif"><span style="font-size:12px"><b><br>
</b></span></font></div><font color="#444444" face="Arial, Helvetica, sans-serif"><span style="font-size:12px">Firsby Lodge, New Main Road, Scamblesby, Louth, Lincs LN11 9XH UK<br></span></font><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;background-color:rgb(255,255,255)">
<span style="color:rgb(68,68,68);font-family:Arial,Helvetica,sans-serif;font-size:x-small"><i>Tel: +44 20 8123 7663 England Registered No. 07936820 VAT No. </i></span><span style="background-color:transparent"><font color="#444444" face="Arial, Helvetica, sans-serif" size="1"><i>128556202</i></font></span></div>
</div>