http://llvm.org/bugs/show_bug.cgi?id=6716

           Summary: Name lookup not finding friend function template
                    definitions inside class template
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]


template<typename T, typename U = T>
struct X { };

template<typename T>
struct Y {
  template<typename U> friend void operator<<(X<T, U>&, const Y&) { }
};

void f(X<int, float> &x) {
  x << Y<int>();
}
terfin:clang dgregor$ clang++ t.C
t.C:10:5: error: invalid operands to binary expression ('X<int, float>' and
      'Y<int>')
  x << Y<int>();
  ~ ^  ~~~~~~~~
1 diagnostic generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to