使用boost :: spirit :: karma时STATIC_ASSERT失败,但未明确使用STATIC_ASSERT

时间:2013-08-26 23:53:09

标签: c++ boost-spirit

我只是通过包含karma.hpp来获取此STATIC_ASSERT失败:

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>'

是什么给出的?我能想到的最好的是静态断言防止在不支持的情况下使用long double。但是,我在其他地方使用长双,这很好。

**编辑:Boost的最新开发版提供了一个修复方法。从SVN获取它。

0 个答案:

没有答案