------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-18 15:09 ------- I think the error message is fine for being different as there is no way to convert "const A" to char. Take the following reduced testcase: struct A { A(const char&); operator char(); /* We cannot use this with "const A". */ };
A f(A &a) { return 1 ? a : -a; /* we are able to convert a to char as there is an operator. */ } A g(const A& c) { return 1 ? c : -c; /* unlike here because of above */ } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22549