This is the mail archive of the
mailing list for the GCC project.
Re: Using C++ in GCC is OK
Richard Guenther <firstname.lastname@example.org> writes:
> On Tue, Jun 1, 2010 at 6:58 PM, Ian Lance Taylor <email@example.com> wrote:
>> Richard Guenther <firstname.lastname@example.org> writes:
>>> Overall the wiki document looks good. ÂI'd like to disallow
>>> * Operators may only be overloaded for types which implement numeric
>>> values, where the overloaded operators implement the usual numeric
>> My thinking here is that it would be reasonable to implement
>> real_arithmetic and mpfr/mpc using overloaded operators. ÂI could
>> certainly be wrong.
> It will hide the cost which is IMHO not wanted.
I agree that that is the usual problem with overloaded operators. I
don't really agree that that is a problem in this specific case. We
have to do those operations anyhow. I don't think the ease of writing
the code is going to cause us to do extra operations in the target
floating point format.