Problem default type converting

Henrik Nilsson (Developer) hni@bossmedia.se
Tue Oct 8 01:39:00 GMT 2002


I'm using GCC 2.96 on Linux
My code

class CString{
	CString()
	CString(const char *)
}

class MyClass{
	f(const CString  &s){}
}

MyClass my;
my.f("")

Then I get compiler error.
Due to the C++ standard my.f("") should create a temp object like this
my.f(CString("")) but instead
I get compiler error

This is not a big problem I'm just surprised that it seems like GCC is not
following the standard.

Any one who know more abot this?
Henrik








More information about the Gcc-help mailing list