Boost logo

Boost :

From: Fredrik Blomqvist (f_blq_at_[hidden])
Date: 2002-04-29 05:07:46


Hi,
I just ported the quaternion and octonion package to
MSVC (6.0 SP5 + Dinkumware)
and hopefully some other compilers might benefit
aswell.
I put the changes in in the file-section as:
quat_oct_msvc-port.zip

Summary of changes:

quaternion.hpp / octonion.hpp:

* changed order of the assignment-operator
declarations, ie put the template-version
  _before_ the non-template version to make MSVC
happy.
  (I hope this won't break any other compiler,
otherwise it's easily done with #ifdefs
   also, but I tried to minimize those)

* replaced use_facet<> with BOOST_USE_FACET

* removed an unneccessary(?) explicit
function-template instantiation in the exp() func.

quaternion_test.cpp:

* #included <boost/limits.hpp>

* added manual abs(float/double) overloads since MSVC
seem to lack these(!)
  Q: has the MSVC lack of overloads for abs() been
properly handled somewhere?
     I briefly recall this issue to have been
discussed on boost-dev or lang.c++ but
     I don't remeber the conclusion.

* added manual using declarations if no
Koening-lookup.

* lots of namespace tweaks, basically added explicit
selections instead.

octonion_test.cpp:

- since octonion depends on quat a few fixes 'hang
along', (mainly using:: stuff) ok?

* #included <boost/limits.hpp>

* put enclosing scopes around a couple of for-loops
(index variable scoping)

* lots of namespace tweaks.

sinc.hpp/sinhc.hpp:

* added an #ifdef to allow the non template-template
versions to be used, this
  enables quat/oct::exp(), cos(), sin() etc to
function.
 

All in all, everything except
sinc_pi/sinhc_pi<quat/oct.> should work on (atleast)
MSVC6 SP5 + Dinkumware. Regarding sinc_pi<quat/oct> I
guess a workaround for MSVC and
other compilers not supporting template-template
params could simply be do let quat/oct
supply it's own explicit version. But since this means
code-duplication (and .hpp file confusion..) I'll let
Hubert decide on this one.

Hope it helps!
/Fredrik Blomqvist
   fredrik_at_[hidden]

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com


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