Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2008-06-02 23:39:33


Author: steven_watanabe
Date: 2008-06-02 23:39:32 EDT (Mon, 02 Jun 2008)
New Revision: 46072
URL: http://svn.boost.org/trac/boost/changeset/46072

Log:
Workaround for msvc ADL bug
Text files modified:
   sandbox/units/libs/units/example/quaternion.cpp | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: sandbox/units/libs/units/example/quaternion.cpp
==============================================================================
--- sandbox/units/libs/units/example/quaternion.cpp (original)
+++ sandbox/units/libs/units/example/quaternion.cpp 2008-06-02 23:39:32 EDT (Mon, 02 Jun 2008)
@@ -199,7 +199,9 @@
               << "L-L = " << L-L << std::endl
               << "L*L = " << L*L << std::endl
               << "L/L = " << L/L << std::endl
- << "L^3 = " << pow<3>(L) << std::endl
+ // unfortunately, without qualification msvc still
+ // finds boost::math::pow by ADL.
+ << "L^3 = " << boost::units::pow<3>(L) << std::endl
 // << "L^(3/2) = " << pow< static_rational<3,2> >(L) << std::endl
 // << "3vL = " << root<3>(L) << std::endl
 // << "(3/2)vL = " << root< static_rational<3,2> >(L) << std::endl
@@ -219,7 +221,7 @@
               << "L-L = " << L-L << std::endl
 // << "L*L = " << L*L << std::endl
 // << "L/L = " << L/L << std::endl
- << "L^3 = " << pow<3>(L) << std::endl
+ << "L^3 = " << boost::units::pow<3>(L) << std::endl
 // << "L^(3/2) = " << pow< static_rational<3,2> >(L) << std::endl
 // << "3vL = " << root<3>(L) << std::endl
 // << "(3/2)vL = " << root< static_rational<3,2> >(L) << std::endl


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