Article View: comp.std.c++
Article #3343Re: Observations on templates
From: David Vandevoorde
Date: Mon, 12 Feb 1996 15:07
Date: Mon, 12 Feb 1996 15:07
19 lines
1476 bytes
1476 bytes
>>>>> "FH" == Fergus Henderson <fjh@munta.cs.mu.OZ.AU> writes:
[...]
FH> template <class T, class S> T cast_d(S &s)
{ return dynamic_cast<T>s; }
FH> template <class T, class S> T cast_d(const S &s)
{ return dynamic_cast<T>s; }
FH> template <class T, class S> T cast_d(volatile S &s)
FH> { return dynamic_cast<T>s; }
FH> template <class T, class S> T cast_d(const volatile S &s)
FH> { return dynamic_cast<T>s; }
Isn't the last one sufficient? (and aren't parentheses required in
`dynamic_cast<T>(s)'?).
Daveed
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. Moderation policy:
http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
Technical Details
Message-ID:
<xsog2cgbnjx.fsf@juicer.cs.rpi.edu>Path:
arc1-ca.pugleaf.net!in2.uu.net!bounce-backReferences:
<ACVI83na99@qsar.chem.msu.su> <4fa6d0$115g@news.gate.net> <4fl2cn$hue@mulga.cs.mu.OZ.AU>Show Full Headers
Complete Article Headers
From: vandevod@cs.rpi.edu (David Vandevoorde) Message-ID: <xsog2cgbnjx.fsf@juicer.cs.rpi.edu> X-Original-Date: 12 Feb 1996 09:56:02 -0500 Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back Date: 12 Feb 96 15:07:42 GMT Approved: fjh@cs.mu.oz.au Return-Path: <daemon@meeker.UCAR.EDU> Newsgroups: comp.std.c++ Subject: Re: Observations on templates Organization: RPI Computer Science References: <ACVI83na99@qsar.chem.msu.su> <4fa6d0$115g@news.gate.net> <4fl2cn$hue@mulga.cs.mu.OZ.AU> In-Reply-To: fjh@munta.cs.mu.OZ.AU's message of 12 Feb 96 05:03:19 GMT X-Newsreader: Gnus v5.1 X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMR9X2uEDnX0m9pzZAQH7NgF+P8Ry+7opdp0gXKTlOTD69g9eOdQ/fSfY Ss5O0le1UAzH1lo2vltRVxAfoy5zmzSI =ZTba