Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!world!wmm From: wmm@world.std.com (William M Miller) Newsgroups: comp.lang.c++ Subject: Re: Abstract Base Class Enforcement Keywords: class, abstract, c++ Message-ID: <1991Mar25.154219.4248@world.std.com> Date: 25 Mar 91 15:42:19 GMT References: <358@intertel.UUCP> <1991Mar24.204943.9998@world.std.com> <1991Mar25.064202.11497@lth.se> 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 subobject of a derived class object, and protected access is sufficient for this case. -- William M. Miller, Glockenspiel, Ltd. wmm@world.std.com