Topic: Doubles and Floats as Template Paramet


Author: clamage@Eng.sun.com (Steve Clamage)
Date: 1998/05/05
Raw View
In article 1@nnrp1.dejanews.com, jkanze@otelo.ibmmail.com writes:
>In article <6iladp$n2h@engnews1.Eng.Sun.COM>#1/1,
>  clamage@Eng.Sun.COM wrote:
>
>> The ARM originally didn't allow non-type template parameters. It's
>> new with the C++ draft standard, and at no time were floating-points
>> allowed as non-type template parameters.
>
>Are you sure?  I don't have a copy of the ARM handy to verify, but from
>memory, non-type template parameters were always supported for class
>templates.  (The ARM didn't allow non-type parameters for function
>templates.)

This is truly bizarre. I wrote that paragraph, but looked up
templates in the ARM before posting it, and discovered the
ARM did allow non-type parameters. I deleted that paragraph
and replaced it with the following paragraph.

>The ARM actually does not allow floating-point non-type template
>arguments. It says the non-type argument must be a constant-
>expression, and in the ARM the definition of constant-expression
>(5.19) excludes floating-point. (A floating-point value must first
>be cast to integer type.)

I posted the article in its revised form, and the article as it
appears on my news server contains the new paragraph but not the
old one. The article on my news server has the same article number
as the one you quote -- yet the contents are different.

Clearly the actual events do not correspond with what I think
happened, but I am at a loss to explain what really did happen.

---
Steve Clamage, stephen.clamage@sun.com



[ 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              ]