Connecting Tech Pros Worldwide Help | Site Map

Initializing order

baibaichen
Guest
 
Posts: n/a
#1: Dec 30 '05
hi, i am reading sutter and Alexandrescu 's book, C++ Coding Standards,
in item 34 Prefer composition to inheritance, they said we can use
non-public inheritance in the below situation:

"If you need to construct the used object before, or destroy it after,
a base class."

but as describled in sutter's another article
order,order!(http://www.gotw.ca/gotw/080.htm)

the derived class always initialized at last!!! so, what's this
sentence mean?

thanks

baibaichen
Guest
 
Posts: n/a
#2: Dec 30 '05

re: Initializing order


this item is online at
"http://www.artima.com/cppsource/codestandardsP.html"

Closed Thread