Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2003-06-09 05:47:54

Bugs item #751269, was opened at 2003-06-09 03:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Category: functional
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Mark Rodgers (mark_rodgers)
Summary: Cannot compile octonion_test.cpp because of bug in sinc.hpp

Initial Comment:
octonion_test.cpp cannot be compiled neither gcc 3.2
nor Intel compiler because of the possible bug in
boost/math/special_functions/sinc.hpp and in
boost/math/special_functions/sinhc.hpp. Here are given
the command line and the error (got from bjam build
from “status” directory):

    g++ -c -Wall -ftemplate-depth-100 -g -O0 -fno-
inline -I"../libs/math/test" -
I "/home/users/vsysoltx/boost_loki/boost_1_30_0" -
o "../libs/math/test/bin/octonion_test.test/gcc/bjam/archit
default/octonion_test.o" "../libs/math/test/../octonion/oct

th/special_functions/sinc.hpp: In
   function `U<T> boost::math::sinc_pi(U<T>) [with T =
float, U =
instantiated from here
th/special_functions/sinc.hpp:109: no
   matching function for call to `abs(const
<internal>:109: candidates are: int std::abs(int)
/usr/include/c++/3.2/cstdlib:119: long int
std::abs(long int)
/usr/include/c++/3.2/cstdlib:142: long long int
   __gnu_cxx::abs(long long int)
/usr/include/c++/3.2/cmath:87: double
/usr/include/c++/3.2/cmath:91: float std::abs
/usr/include/c++/3.2/cmath:95: long double

The reason why compiler cannot find the appropriate
boost::math::abs<T>(octonion<T>) definition is that here
is used ::abs directive inside function. When this
directive is used in the function definition, it hides the
names from outermost namespaces. I don’t know why, I
haven’t found this in standards, but that’s true both for
gcc 3.2 and for Intel compiler. To compile these files I
used a patch which is attached. In it the using directives
are simply carried out of the function definition. That’s
work with both compiler.

For any questions you may contact me via


You can respond by visiting:

This email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at
Boost-bugs mailing list

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