What/where is the scope of friend functions definition defined in class template?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8207633/whats-the-scope-of-inline-friend-functions">What’s the scope of inline friend functions?</a>  </p>
</blockquote>



<p>Consider simple program :</p>

<pre><code>template&lt;typename T&gt; struct foo{
friend void bar(){}
};

int main(){
foo&lt;int&gt;(); foo&lt;float&gt;();
}
</code></pre>

<p>Above code breaks the ODR rule, I wonder why? , also where is the scope of function <code>bar</code> ?</p>
