Many times when I compile something with a typo or some other typing mismatch, I get the standard “error: no match for ‘functionname’ in …” error. This is great. Then, especially in the case of overloaded functions and operators, g++ goes on and list like 10 pages of candidates which are just hideous and massive template definitions.
The error message is great, but is there any way to disable it from suggesting other functions variants?
As far as I know, there is no compilation flag in GCC to disable the suggested candidates in case of ambiguous function calls.
Your only hope is perhaps to patch the GCC source code.
Digging in it (version: 4.7.1), I’ve found what appear to be the relevant function in
gcc/cp/pt.c:As an educated guess, I think that you only need to comment out the function body.