[LLVMbugs] [Bug 17075] New: Clang doesn't see extra definitions of operator.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Sep 2 23:43:31 PDT 2013
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: unassignedclangbugs at nondot.org
Reporter: o01eg at yandex.ru
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130903/4ae3a4aa/attachment.html>
More information about the llvm-bugs
mailing list