Article View: comp.std.c++
Article #3858Re: double const declarations
From: David Byrden
Date: Thu, 28 Mar 1996 21:16
Date: Thu, 28 Mar 1996 21:16
24 lines
1597 bytes
1597 bytes
dak <pierreba@poster.cae.ca> wrote:
>The problem arise when T is instantiated with a Container of constants:
>
>SmartPtr<const int> a;
>
>Here we have a double const which is not supported by the compiler, nor the
>standard, I believe. Is there a fix or should we abandon all hope of using
>const returns in templates ?
Sheer common sense tell you that we have to allow this. It can arise
with 'volatile' as well. The Microsoft compiler gives just a warning.
David
[ 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 ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Technical Details
Message-ID:
<4jev2k$v60@nuacht.iol.ie>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<Pine.A32.3.91.960325093715.29874A-100000@zorglub.cae.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: David Byrden <Goyra@iol.ie> Newsgroups: comp.std.c++ Subject: Re: double const declarations Date: 28 Mar 1996 21:16:20 GMT Organization: Ireland On-Line Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <4jev2k$v60@nuacht.iol.ie> References: <Pine.A32.3.91.960325093715.29874A-100000@zorglub.cae.ca> NNTP-Posting-Host: taumet.eng.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Nntp-Posting-Host: dialup-193.dublin.iol.ie X-Mailer: Mozilla 1.22KIT (Windows; I; 16bit) X-Lines: 17 Content-Length: 517 Originator: clamage@taumet