[LLVMbugs] [Bug 14115] clang assertion failure on incompatible std::vector comparison.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 12 18:49:26 PDT 2013


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

rtrieu at google.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rtrieu at google.com
         Resolution|---                         |FIXED

--- Comment #4 from rtrieu at google.com ---
Given:

template<class> class base {};
template<class> class vector : base<int> {};
template<class T> void f(const vector<T>& x, const vector<T>& y) {}

int main() {
  vector<int> a;
  vector<float> b;
  f(a, b);
}

Clang now produces this message instead of crashing:

pr14115.cc:9:3: error: no matching function for call to 'f'
  f(a, b);
  ^
pr14115.cc:4:24: note: candidate template ignored: deduced conflicting types
for parameter 'T' ('int' vs. 'float')
template<class T> void f(const vector<T>& x, const vector<T>& y) {}

-- 
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/20130413/2805e421/attachment.html>


More information about the llvm-bugs mailing list