Possible Duplicate:
What’s the scope of inline friend functions?
Consider simple program :
template<typename T> struct foo{
friend void bar(){}
};
int main(){
foo<int>(); foo<float>();
}
Above code breaks the ODR rule, I wonder why? , also where is the scope of function bar
?