[Bug c++/33940] call of overloaded 'basic_string(const<anonymous class>&)' is ambiguous for a template member function

pcarlini at suse dot de gcc-bugzilla@gcc.gnu.org
Mon Oct 29 17:40:00 GMT 2007



------- Comment #4 from pcarlini at suse dot de  2007-10-29 17:39 -------
In practice, consider this:

const
class {
public:
  template <class T> operator T() const
  {
    return int();
  }

} MYNULLOBJECT = {};

void f(int);
void f(unsigned);

int main()
{
  f(MYNULLOBJECT);
}

No conforming compiler accepts it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33940



More information about the Gcc-bugs mailing list