C++ 使用boost::spirit::karma静态断言失败,但不显式使用静态断言

C++ 使用boost::spirit::karma静态断言失败,但不显式使用静态断言,c++,boost-spirit,C++,Boost Spirit,仅通过包含karma.hpp,我就得到了这个静态的错误: In file included from /apps/boost/include/boost/math/special_functions/detail/round_fwd.hpp:12:0, from /apps/boost/include/boost/math/special_functions/math_fwd.hpp:26, from /apps/boost/include/b

仅通过包含karma.hpp,我就得到了这个静态的错误:

In file included from /apps/boost/include/boost/math/special_functions/detail/round_fwd.hpp:12:0,
             from /apps/boost/include/boost/math/special_functions/math_fwd.hpp:26,
             from /apps/boost/include/boost/math/special_functions/fpclassify.hpp:19,
             from /apps/boost/include/boost/spirit/home/support/detail/sign.hpp:22,
             from /apps/boost/include/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp:22,
             from /apps/boost/include/boost/spirit/home/karma/numeric/bool_policies.hpp:16,
             from /apps/boost/include/boost/spirit/home/karma/numeric/bool.hpp:29,
             from /apps/boost/include/boost/spirit/home/karma/numeric.hpp:13,
             from /apps/boost/include/boost/spirit/home/karma.hpp:15,
             from /apps/boost/include/boost/spirit/include/karma.hpp:16,
             from /home/<my header file that includes boost/spirit/include/karma.hpp>
             from /home/<my other header file that includes the above>
/apps/boost/include/boost/math/tools/promotion.hpp: In instantiation of `struct boost::math::tools::promote_args<long double, float, float, float, float, float>':
/apps/boost/include/boost/math/special_functions/sign.hpp:114:50:   required from `int boost::math::signbit(T) [with T = long double]'
/apps/boost/include/boost/spirit/home/support/detail/sign.hpp:47:51:   required from `bool boost::spirit::detail::signbit(T) [with T = long double]'
/apps/boost/include/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp:130:47:   required from here
/apps/boost/include/boost/math/tools/promotion.hpp:141:10: error: invalid application of `sizeof' to incomplete type `boost::STATIC_ASSERTION_FAILURE<false>'
有什么好处?我所能想到的最好的情况是,静态断言可以防止在不受支持的情况下使用longdouble。但是,我在其他地方使用长双色,这很好


**编辑:Boost的最新开发版本提供了一个补丁。从SVN获取它。

什么编译器、标志等。?只是在g++-std=c++11上编译include int main{}对我来说很有用;makefile是用CMake生成的,我没有要求任何特殊的东西。我包括warning_disable.hpp和BOOST_FUSION_ADAPT_ADT的标题。G++版本是4.7.3.FYI-我刚刚尝试了GManNickG所做的,我得到了同样的失败。我应该试着重建Boost吗?试着直接用g++构建我的代码片段,让CMake从图片中消失。不幸的是,我不知道如何解决它。您可以尝试将更改还原为boost/math/special_functions/sign.hpp,或者简单地使用boost 1.53.0。我看到Igor R.回答了几个boost spirit问题,所以也许你很幸运,让他告诉你他是如何解决这个问题的。