[ quantlib-Bugs-1116937 ] M_PI is redefined blindly for MSVC

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ quantlib-Bugs-1116937 ] M_PI is redefined blindly for MSVC

SourceForge.net
Bugs item #1116937, was opened at 2005-02-05 18:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=1116937&group_id=12740

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Philip Craig (philipcraig)
Assigned to: Nobody/Anonymous (nobody)
Summary: M_PI is redefined blindly for MSVC

Initial Comment:
In config.msvc.hpp, M_PI is #defined.

This is all well and good, except if another library is
used that also included. In that case, they fight.
RogueWave is such a library.

The code #define ing M_PI should read like:

#  ifndef M_PI
#    define M_PI 3.141592653589793238462643383280
#  endif

This way, it will compile without warnings even if M_PI
has been defined already.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=1116937&group_id=12740