I played with clang for a while, and I came across "test / SemaTemplate / dependent-template-recover.cpp" (in the clang distribution), which should provide hints for recovering from a template error.
All this can be easily divided into a minimal example:
template<typename T, typename U, int N> struct X { void f(T* t) {
The error message received by clang:
tpl.cpp:6:13: error: use 'template' keyword to treat 'f0' as a dependent template name t->f0<U>(); ^ template 1 error generated.
... But it's hard for me to understand where exactly one should insert the template keyword so that the code is syntactically correct?
c ++ templates clang llvm
user350814 Sep 24 '10 at 10:59 2010-09-24 10:59
source share