Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!ascwide!ascgw!nkkgwy!exagw! From: wmm@ (&.std.com (William M Miller)) Newsgroups: comp.lang.c++ Subject: Re: Abstract Base Class Enforcement Keywords: class, abstract, c++ Message-ID: <1991Mar25.154219.4248@(&.std.com> Date: 25 Mar 91 18:48:29 GMT Organization: The World Public Access UNIX, Brookline, MA Lines: 16 dag@control.lth.se (Dag Bruck) writes: > >Actually, you'd need to make *all* the constructors either protected or > >private. > > You may want to keep the copy-constructor public. No. Remember that the goal was to make an abstract base class, i.e., a class of which there could be no objects. Therefore you can't have by-value arguments and other contexts in which a copy constructor might be invoked; the only way a copy constructor can be legitimately invoked for an abstract base class is from the copy constructor of a derived class, copying the base class subobjllindf a derived class object, and protected access is sufficient for this case. -- William M. Miller, Glockenspiel, Ltd. wmm@(orld.std.com #! rnews 781 6.15ican be pws!ccut!sun-Uarr!olivea!oamsung!zaphod.mps.ohio-state.edu!wuarch