https://llvm.org/bugs/show_bug.cgi?id=23615
Bug ID: 23615
Summary: Bad diagnostic on missing operator() for object
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
In the following minimal example there is an error:
Minimal example:
#include<iostream>
int main() {
std::cout << std::endl();
return 0;
}
I found it really hard to tell the error form the generated diagnostic:
error: no matching function for call to 'endl'
std::cout << std::endl();
^~~~~~~~~
/include/libcxx/ostream:1032:1: note: candidate function template not viable:
requires single argument '__os', but no arguments were provided
endl(basic_ostream<_CharT, _Traits>& __os)
^
I think it would be better if the exact error would be spelled out again:
"object std::endl of type ___ does not have a function call operator
operator()"
before including the note, since in this case the note confused me and pointed
me in the wrong direction.
--
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