List:MySQL++« Previous MessageNext Message »
From:Chris Frey Date:July 21 2005 10:11pm
Subject:Re: Beta 2: Warning when compiling program in FC4 GCC4
View as plain text  
On Thu, Jul 21, 2005 at 12:58:19PM -0400, Carlos M. Gutierrez wrote:
> private:
>         OptionalExceptions& assoc_;
>         bool exceptions_were_enabled_;
> 
>         // Hidden assignment operator and copy ctor, because we should not
>         // be copied.
>         NoExceptions(const NoExceptions&);
>         NoExceptions& operator=(const NoExceptions&) { }
> 
> As defined in that last line, operator= should return a NoExceptions 
> reference but it does not. I am not an expert programmer, should the "{ 
> }" just become ";" ?

Yes.

The latest SVN version has this "fixed", but incorrectly in my
opinion.  It currently just returns *this, whereas I don't think
operator=() should be defined at all, just declared.

- Chris

Thread
m4 macro for mysql++?Pål Brattberg13 Jul
  • Re: m4 macro for mysql++?Warren Young13 Jul
    • Beta 2: Warning when compiling program in FC4 GCC4Carlos M. Gutierrez21 Jul
      • Re: Beta 2: Warning when compiling program in FC4 GCC4Carlos M. Gutierrez21 Jul
      • Re: Beta 2: Warning when compiling program in FC4 GCC4Chris Frey22 Jul
        • Re: Beta 2: Warning when compiling program in FC4 GCC4Warren Young22 Jul
          • Re: Beta 2: Warning when compiling program in FC4 GCC4Chris Frey22 Jul