使用`boost :: lexical_cast`会导致错误“标识符“ __float128”未定义“

时间:2018-11-25 18:21:22

标签: c++ boost casting

在我当前的C ++项目中,我想使用boost::lexical_cast,如下所示:

namespace lex = boost::lexical_cast;
std::vector< std::string > line_sep;
// ...
int dim_n = lex::lexical_cast<int>(line_sep[0]);

但是,在添加这些代码行时,我遇到了以下错误:

boost/math/policies/policy.hpp", line 818: error:                                                                                                                      
          identifier "__float128" is undefined
struct precision<BOOST_MATH_FLOAT128_TYPE, Policy>
                 ^

有人知道可能是什么问题吗?以防万一我在下面添加了g++ -v的输出:

Target: x86_64-redhat-linux
Configured with: ../gcc-4.8.1/configure --prefix=/cadappl_sde/ictools/gcc/4.8.1-64 --enable-static --enable-shared --with-gmp=/cadappl_sde/ictools/gcc/4.8.1-64 --with-mpfr=/cadappl_sde/ictools/gcc/4.8.1-64 --with-mpc=/cadappl_sde/ictools/gcc/4.8.1-64 --enable-bootstrap --enable-checking=release --disable-werror --disable-nls --enable-threads=posix --disable-libunwind-exceptions --enable-__cxa_atexit --enable-gnu-unique-object --enable-languages=c,c++,fortran --disable-libada --enable-plugin --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.1 (GCC)

我使用Boost 1.59版。

0 个答案:

没有答案