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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs