This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem default type converting


Hello Henrik,
your C++ is correct and compiles at least with 2.95.3. I guess that you have 
discoverd another shortcomming of gcc 2.96.

Ciao
 
On Tuesday 08 October 2002 01:36, Henrik Nilsson \(Developer\) wrote:
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]