freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pooma-dev] RFA: Reorder Initializers (2 of 3)


From: Jeffrey Oldham
Subject: Re: [pooma-dev] RFA: Reorder Initializers (2 of 3)
Date: Wed, 28 Mar 2001 16:31:18 -0800
User-agent: Mutt/1.2.5i

On Wed, Mar 28, 2001 at 03:45:05PM -0800, James Crotinger wrote:
> Why are these changes needed? I thought ordering didn't matter. Also, you
> added some explicit calls to default constructors - again, why?
> 
> (You may need to reply to address@hidden)

Good question.  Since g++ was producing warnings, I assumed that it
was warning the C++ standard was violated, but C++ standard \S 12.6.2
explicitly permits any order of initializers although they are called
in the order of class declaration, not initializer order.  However,
Stroustrup, \S 10.4.6, writes, "It is best to specify the initializers
in the member declaration order."  I guess this is why g++ wants to
produce warning messages.

I added base class initializers when g++ warned that a copy
constructor did not initialize its base class.  For example,

    /nfs/oz/home/oldham/pooma/r2/src/NewField/Updater/UpdaterList.h:70: 
warning: base
       class `class RefCounted' should be explicitly initialized in the copy 
       constructor

Thus, please
accept: if you want g++ users to not have to deal with warning messages
reject: otherwise.

Thanks,
Jeffrey D. Oldham
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]