Hi All,
If I include boost/regex.hpp - the builtin c signbit stops being available.
I am using my version of gcc 4.5.0 and my version of boost (built and
installed with defaults)
I've removed distro's install of boost and gcc.
I am new to this list so apologies if I've missed any need information.
TIA
Adrian
----------------------------------------------------------------------
adrianc@dluadrianc:~> cat signbit.cc
#include <iostream>
#include
#include
#ifdef WITH_BOOST_REGEX_ADRIAN
#include
#endif
int main(int argc, char *argv[])
{
float a=12.4234;
float b=-123.4333;
#ifdef _XOPEN_SOURCE
std::cout << "_XOPEN_SOURCE=" << _XOPEN_SOURCE << std::endl;
#endif
#ifdef _ISOC99_SOURCE
std::cout << "_ISOC99_SOURCE is here\n";
#endif
std::cout << "Boost version=" << BOOST_LIB_VERSION << std::endl;
std::cout << "Boost version=" << BOOST_VERSION << std::endl;
#ifdef WITH_SIGNBIT_ADRIAN
std::cout << "signbit a=" << signbit(a) << std::endl;
std::cout << "signbit b=" << signbit(b) << std::endl;
#endif
return 0;
}
adrianc@dluadrianc:~> g++ -DWITH_SIGNBIT_ADRIAN signbit.cc
adrianc@dluadrianc:~> a.out
_XOPEN_SOURCE=700
_ISOC99_SOURCE is here
Boost version=1_43
Boost version=104300
signbit a=0
signbit b=-2147483648
adrianc@dluadrianc:~> g++ -DWITH_SIGNBIT_ADRIAN -DWITH_BOOST_REGEX_ADRIAN
signbit.cc
signbit.cc: In function 'int main(int, char**)':
signbit.cc:25:42: error: 'signbit' was not declared in this scope
adrianc@dluadrianc:~>
:~> which gcc
/usr/local/bin/gcc
:~> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapp
er
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.5.0/configure --enable-__cxa_atexit
--enable-languages=c,c++ --enable-threads --with-cpu=core2 --disable-nls
--with-arch=i686 --with-mpfr=/usr/local --with-gmp=/usr/local
--with-mpc=/usr/local --with-build-time-tools=/usr/local --enable-lto
Thread model: posix
gcc version 4.5.0 (GCC)