Boost logo

Boost :

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

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

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
  (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.


* #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

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


- 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.


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

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

Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

Boost list run by bdawes at, gregod at, cpdaniel at, john at