[PATCH] Improve error reporting for SFINAE
Richard Smith
richard at metafoo.co.uk
Mon Apr 6 13:45:59 PDT 2015
As noted on PR13309, this is not acceptable as-is -- note that the sample diagnostic:
smurf.cpp:6:3: error: no matching function for call to 'f'
f(3);
^
smurf.cpp:3:41: note: candidate template ignored: substitution failure [with T = int]: no matching function for call to 'h'
template<class T> auto g(T x)->decltype(h(x)){return h(x);}
... gives the user no idea of how we got from a call to `f` into a call to `g`. If we produced a stack of 'in instantiation of' notes, this would be fine (note that's exactly what my patch in comment#1/comment#2 of that bug does).
REPOSITORY
rL LLVM
http://reviews.llvm.org/D8309
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list