From -4202947437115088240
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,edd477ec92e5348f
X-Google-Attributes: gidf78e5,public
X-Google-Thread: fc772,ef0c226459c03bdf
X-Google-Attributes: gidfc772,public
From: Valentin Bonnard <bonnard@clipper.ens.fr>
Subject: Re: Protected Inheritance
Date: 1999/02/16
Message-ID: <36C046BE.4233@clipper.ens.fr>#1/1
X-Deja-AN: 444964858
X-NNTP-Posting-Host: netlab.cs.rpi.edu
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <Pine.GSO.3.95-960729.990131142619.5694B-100000@finan.ncl.ac.uk> <slrn7bbi9a.q1a.sbnaran@localhost.localdomain> <sUPt2.16333$202.8056314@news1.teleport.com> <79aesq$qlr$1@uuneo.neosoft.com> <HEbu2.18017$202.8772558@news1.teleport.com> <36b9fd49.0@10.1.1.65> <AwGu2.19901$202.9740872@news1.teleport.com>
X-Submission-Address: c++-submit@netlab.cs.rpi.edu
X-Original-Date: Tue, 09 Feb 1999 15:31:26 +0100
X-UID: 0000000001
X-Status: $$$T
X-Approved-For-Group: harkness@skeptics.org comp.lang.c++.moderated
Organization: Ecole Normale Superieure, Paris, France
X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated  iQBVAwUANsjFIUHMCo9UcraBAQGE1AH+JghsjPJrb6yoJ2dpB13dlarZO+VUO7Uv  HBwpn9H+KF7H49HdHkGD7InCJOQXv9Z8fm7dBF8tmnLO7nfGcCfvwA== =ISoN
Newsgroups: comp.std.c++,comp.lang.c++.moderated
Originator: clamage@taumet


Scott Meyers wrote:

> True, but don't forget the copy constructor:
> 
>   class MoreDerived: public Something {
>   public:
>     MoreDerived()
>     : Something(*new Something) {}   // initialize DontDeriveFromSomething
>   };                                 // via copy ctor

Could you explain why you think that it should work ?

> >By the way, I tried to templatize the idiom, and I thought it should work.
> 
> I think it should, too.

No, sadly it won't, because of some strange [moderators, I can say
stupid ?] 
rule in the standard, which prohibits making template parameters
friends.

-- 

Valentin Bonnard

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]

      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]




