Boost logo

Boost :

From: Job Mulder (Job_at_[hidden])
Date: 2005-11-30 05:09:02


My Visual Studio 6 requires the trigonometry functions sin, cos, etc. to
be prefixed with :: in the quaternion.hpp, otherwise I get:

"
...\boost-1_32\boost\math\quaternion.hpp(1686) : error C2784: 'class
boost::math::quaternion<T> __cdecl boost::math::sin(const class
boost::math::quaternion<T> &)' : could not deduce template argument for
'const class boost::math::quaternion<T> &' from 'const double'

...\main.cpp(112) : see reference to function template instantiation
'class boost::math::quaternion<double> __cdecl
boost::math::spherical(const double &,const double &,const double
&,const double &)' being compiled
"

I'm using a quaternion<double> here.
 
Changing the line
 
    T d = sin(phi2);
 
into
 
    T d = ::sin(phi2);
 
fixes the problem (for that line).
 
The rest of the file contains lots more trigonometry (and other math)
functions, which probably also need to be prefixed.

 
-----------------------------------------------------------------------
Job P. Mulder
Xsens Technologies B.V.
http://www.xsens.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk