[ 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 19:09
Message generated for change (Comment added) made by nando
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=1116937&group_id=12740

Category: None
Group: None
>Status: Closed
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.

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

>Comment By: Ferdinando Ametrano (nando)
Date: 2005-02-07 15:21

Message:
Logged In: YES
user_id=34616

Fixed in CVS. Thank you

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

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