2013/1/16 Zack Weinberg <za...@panix.com>

> On 2013-01-16 2:38 PM, Benoit Jacob wrote:
>
>> For starters, the standard C++ <cmath> library is already much better.
>>
>
> I was under the impression that the <cwhatever> headers could not be used
> in Mozilla code.  Is that no longer the case?
>

Really? I've been using them in all my Mozilla code for 3 years now and
never had a reviewer complain about that. What would be the rationale for
allowing foo.h and disallowing cfoo anyway?


>
> I also expect that <cmath> should contain at least as much weird shit as
> the corresponding <math.h>, since as far as I know no OS vendor has ever
> actually succeeded in making the <cwhatever> headers define only symbols in
> namespace std.  Thus it would not help with my particular problem. However,
> the math headers are a bit of a special snowflake and I could *imagine*
> <cmath> not being as troublesome as <math.h>.  Does anyone know for sure?


I was only addressing the "surprising behavior when everything isn't a
'double'" part of your email. Clearly, <cmath> typically #includes math.h
so you get the same things from it, and more.

At least here on GCC 4.6 / linux, <cmath> #includes math.h.

That said, I have been including it in code that also includes XPCOM,
without trouble.

Benoit




>
>
> zw
> ______________________________**_________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/**listinfo/dev-platform<https://lists.mozilla.org/listinfo/dev-platform>
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to