Constant.h can interfere with other headers that rely on <cmath>

Issue #78 resolved
Alexandre Foley created an issue

The header file Constant.h includes <cmath> and proceed to undefine the macros it creates for many constant. Doing so, mean that including this file before any other that rely on the constants of <cmath> will break them.

I would suggest using different name from the macros for the variables in the blaze namespace, maybe removing the "M_" from their names (less than ideal for the exponential constant E).

Comments (6)

  1. Klaus Iglberger

    Hi Alexandre!

    Thanks a lot for pointing out this defect. We admit that the <blaze/math/Constants.h> header is of very limited use and can cause problems with the ```<cmath> header. Since this header is not used anywhere inside Blaze and since it is not to be expected that users of Blaze make use of it we will simply remove the header file. We apologize for the problems,

    Best regards,

    Klaus!

  2. Klaus Iglberger

    The fix has been implemented and tested as required. It is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.1.

  3. Log in to comment