This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH: Disallow floating-point literals in integral-constant expressions
Joe Buck <Joe.Buck@synopsys.COM> writes:
| 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>.
Not that I'm a fan of that extension, but I'm not convinced by that
argument. How is it different from