Boost logo

Boost :

From: Alkis Evlogimenos (alkis_at_[hidden])
Date: 2002-10-14 10:33:35


The quaternion tests fail with this error message:

In file included from /tmp/boost/boost/boost/math/octonion.hpp:14,
                 from
/tmp/boost/boost/libs/math/octonion/octonion_test.cpp:14:
/tmp/boost/boost/boost/math/quaternion.hpp: In function `class _STL::istream &
boost::math::operator >>(_STL::istream &, boost::math::quaternion<X> &)':
/tmp/boost/boost/boost/math/quaternion.hpp:1154: type/value mismatch at
argument 1 in template parameter list for `template <class _CharT>
_STL::ctype<_CharT>'
/tmp/boost/boost/boost/math/quaternion.hpp:1154: expected a type, got
`charT'
/tmp/boost/boost/boost/math/quaternion.hpp:1154: confused by earlier errors,
bailing out

    /opt/gcc2/bin/g++ -c -Wall -ftemplate-depth-100 -D_STLP_DEBUG -g -O0
-fno-inline -D_STLP_USE_DYNAMIC_LIB -I"../status" -isystem
"/opt/gcc2/include/stlport" -isystem "/tmp/boost/boost" -o
"../status/bin/octonion_test.test/gcc2953-stlport/debug/runtime-link-dynamic/octonion_test.o"
"/tmp/boost/boost/libs/math/octonion/octonion_test.cpp"

The following patch fixes this issue (moving the typedef before getting
std::ctype):

Index: boost/math/quaternion.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/math/quaternion.hpp,v
retrieving revision 1.5
diff -r1.5 quaternion.hpp
1151a1152,1155
> #if defined(__GNUC__) && __GNUC__ < 3
> typedef char charT;
> #endif
>
1155,1158d1158
< #endif
<
< #if defined(__GNUC__) && __GNUC__ < 3
< typedef char charT;

Similarly for octonion:

Index: boost/math/octonion.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/math/octonion.hpp,v
retrieving revision 1.6
diff -r1.6 octonion.hpp
1735a1736,1739
> #if defined(__GNUC__) && __GNUC__ < 3
> typedef char charT;
> #endif
>
1739,1742d1742
< #endif
<
< #if defined(__GNUC__) && __GNUC__ < 3
< typedef char charT;

-- 
Alkis

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