Remove C++ math work-arounds

#95 Open
Repository
Branch
eschnett/math
Repository
Branch
master

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

git checkout master
git merge --no-ff -m 'Merged in eschnett/math (pull request #95)' remotes/origin/eschnett/math
Author
  1. Erik Schnetter
Reviewers
Description

Years ago we introduced work-arounds for C++ compilers that didn't properly support the std:: namespace for math functions. These compilers are not relevant any more, and the work-arounds are now harmful since they violate the C++ standard.

Comments (3)

  1. Roland Haas

    well they look harmless, question is are there still old enough compilers around that we need them?

  2. Roland Haas

    The workarounds seem to be still needed on QueenBee (icc 14.0.2 it seems though it does have newer versions available and intel18 should be useable based on the modules listed by module avail) and using branches eschnett/math of Cactus and Carpet fails to compile with:

    COMPILING EinsteinEvolve/NewRad/src/extrap.cc
    In file included from /home/rhaas/ET_trunk/configs/sim/bindings/include/GenericFD.h(4),
                     from /home/rhaas/ET_trunk/arrangements/EinsteinEvolve/NewRad/src/extrap.cc(8):
    /home/rhaas/ET_trunk/arrangements/KrancNumericalTools/GenericFD/src/GenericFD.h(78): error: more than one instance of overloaded function "signbit" matches the argument list:
    In file included from /home/rhaas/ET_trunk/configs/sim/bindings/include/GenericFD.h(4),
                     from /home/rhaas/ET_trunk/arrangements/EinsteinEvolve/NewRad/src/extrap.cc(8):
                function "signbit(double)"
    In file included from /home/rhaas/ET_trunk/configs/sim/bindings/include/GenericFD.h(4),
                     from /home/rhaas/ET_trunk/arrangements/EinsteinEvolve/NewRad/src/extrap.cc(8):
                function "std::signbit(double)"
    In file included from /home/rhaas/ET_trunk/configs/sim/bindings/include/GenericFD.h(4),
                     from /home/rhaas/ET_trunk/arrangements/EinsteinEvolve/NewRad/src/extrap.cc(8):
                argument types are: (CCTK_REAL8)
    In file included from /home/rhaas/ET_trunk/configs/sim/bindings/include/GenericFD.h(4),
                     from /home/rhaas/ET_trunk/arrangements/EinsteinEvolve/NewRad/src/extrap.cc(8):
        int s = signbit(x);
    

    The current choice being between breaking the existing ET on QueenBee (old but in the official list of supported machines) and breaking CarpetX I would rather keep CarpetX broke until QueenBee’s option list etc has been updated.