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

            Bug ID: 17075
           Summary: Clang doesn't see extra definitions of operator.
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 11136
  --> http://llvm.org/bugs/attachment.cgi?id=11136&action=edit
Test code

Clang uses only 'template <class T> Stream& Stream::operator>>(T&)' and doesn't
see another matching definition 'template<class T> Stream& operator>>(Stream&,
std::vector<T>&)':

$ clang++ -std=c++11 -Wall -pedantic -Wextra test-sfinae.cpp 
test-sfinae.cpp:7:5: error: no member named 'Serialize' in 'std::vector<int,
std::allocator<int> >'
                t.Serialize(*this);
                ~ ^
test-sfinae.cpp:33:4: note: in instantiation of function template
specialization 'Stream::operator>><std::vector<int, std::allocator<int> > >'
requested here
        s >> data;
          ^
1 error generated.


Gcc 4.8.1 and 4.6.4 successfully compiles it. Clang without -std=c++11 as well.

-- 
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