[LLVMbugs] [Bug 21080] New: Misleading error message: error: implicit instantiation of undefined template
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Sep 26 08:56:55 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=21080
Bug ID: 21080
Summary: Misleading error message: error: implicit
instantiation of undefined template
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: ilja.j.honkonen at nasa.gov
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Trying to compile a reduced version of the program at
https://github.com/nasailja/gensimcell/blob/a342ba0347de2f0d333641a39477de7c2abbe3cb/tests/parallel/one_variable.cpp
produces a very misleading message considering that the correct fix is to just
add #include "array" to the file:
../../source/gensimcell_impl.hpp:626:31: error: implicit instantiation of
undefined template 'std::__1::array<double, 3>'
typename Variable::data_type data;
^
../../source/gensimcell.hpp:136:9: note: in instantiation of template class
'gensimcell::detail::Cell_impl<Optional_Transfer, 1, test_variable2>'
requested here
public detail::Cell_impl<Transfer_Policy, sizeof...(Variables),
Variables...>
^
one_variable.cpp:53:6: note: in instantiation of template class
'gensimcell::Cell<gensimcell::Optional_Transfer,
test_variable2>' requested here
a[0].set_transfer_all(true, v2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tuple:69:65:
note:
template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TYPE_VIS_ONLY array;
^
1 error generated.
A correct looking array (std::...::array) is even mentioned in the error
message. It probably wouldn't be too difficult to give a hint to the user that
array is being used without including the required header...
--
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/20140926/8d79e717/attachment.html>
More information about the llvm-bugs
mailing list