Disable g++ “note candidates are..” compiler message

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:

void
print_candidates(tree fns)
{
  const char *str = NULL;
  print_candidates_1 (fns, false, &str);
  gcc_assert (str == NULL);
}

As an educated guess, I think that you only need to comment out the function body.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)