This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH: Disallow floating-point literals in integral-constant expressions


On Tue, Feb 01, 2005 at 12:16:14PM -0800, Mark Mitchell wrote:
> My thinking is that we've been disallowing template parameters of 
> floating-point type for a while now.  If we really want to allow 
> constant expressions of floating-point type forever more, we ought to 
> also allow template parameters of floating-point type as well.

I would argue against allowing template parameters of floating-point
type, because you get two distinct functions instead of one because
of rounding errors: func<1.0> vs func<0.9999999999999>.

I have no objection to deprecating floating point static constants;
I just think we should follow our normal policy of issuing warnings first.

> Furthemore, deprecating the extension doesn't make it impossible for us 
> to keep it -- but it does make it easier to remove it.

Agreed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]