This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem default type converting
- From: Sebastian Huber <sebastian-huber at web dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 8 Oct 2002 11:01:20 -0700
- Subject: Re: Problem default type converting
- References: <KEEPIDENLNDAMPIBECHFGECOCFAA.hni@bossmedia.se>
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