Boost logo

Boost-Commit :

From: pbristow_at_[hidden]
Date: 2007-10-02 13:38:29


Author: pbristow
Date: 2007-10-02 13:38:24 EDT (Tue, 02 Oct 2007)
New Revision: 39656
URL: http://svn.boost.org/trac/boost/changeset/39656

Log:
Added tip for MSVC preprocessor defines
Text files modified:
   sandbox/math_toolkit/libs/math/doc/policy_tutorial.qbk | 26 ++++++++++++++++++++++++--
   1 files changed, 24 insertions(+), 2 deletions(-)

Modified: sandbox/math_toolkit/libs/math/doc/policy_tutorial.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/policy_tutorial.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/policy_tutorial.qbk 2007-10-02 13:38:24 EDT (Tue, 02 Oct 2007)
@@ -112,10 +112,32 @@
 The default policies used by the library are changed by the usual
 configuration macro method.
 
-For example passing `-DBOOST_MATH_DOMAIN_ERROR_POLICY=errno_on_error` to
+For example, passing `-DBOOST_MATH_DOMAIN_ERROR_POLICY=errno_on_error` to
 your compiler will cause domain errors to set `::errno` and return a NaN
 rather than the usual default behaviour of throwing a `std::domain_error`
-exception. There is however a very important caveat to this:
+exception.
+
+[tip For Microsoft Visual Studio,you can add to the Project Property Page,
+C/C++, Preprocessor, Preprocessor definitions like:] [/MSVC tip]
+[pre
+\"BOOST_MATH_ASSERT_UNDEFINED_POLICY\=0\"
+\"BOOST_MATH_OVERFLOW_ERROR_POLICY\=\"errno_on_error\"\"
+]
+This may be helpful to avoid complications with pre-compiled headers
+that may mean that the equivalent definitions in source code:
+
+ #define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
+ #define BOOST_MATH_OVERFLOW_ERROR_POLICY errno_on_error
+
+may be ignored.
+
+The compile command line shows:
+[pre
+/D \"BOOST_MATH_ASSERT_UNDEFINED_POLICY\=0\"
+/D \"BOOST_MATH_OVERFLOW_ERROR_POLICY\=\"errno_on_error\"\"
+]
+
+There is however a very important caveat to this:
 
 [important
 [*['Default policies changed by setting configuration macros must be changed


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk