【发布时间】:2020-04-02 07:44:56
【问题描述】:
我目前正在将boost 从 1.55.0 升级到 1.72.0,其中 boost 是使用 MSVC 141 构建的,即使实用程序标头自 1.55.0 以来没有太大变化,但有很多我找不到的错误一种解决方法。
在编译解决方案时,我收到数百个类似于以下内容的错误:
boost-1_72_0\boost\utility\detail\result_of_iterate.hpp(43): error C2977: 'boost::result_of': too many template arguments
和:
boost-1_72_0\boost\utility\detail\result_of_iterate.hpp(27): error C2065: 'BOOST_RESULT_OF_ARGSA': undeclared identifier
等等……
除了错误列表中的项目外,没有指定其他任何内容。当我尝试检查 boost 头文件时,Visual Studio (2017) IntelliSense 表明 boost 有问题。 result_of_iterate.hpp 中显示的错误示例:
template<typename R, typename FArgs BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
struct tr1_result_of_impl<R (&)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), FArgs, false>
{
typedef R type;
};
这里 tr1_result_of_impl 产生一个模板参数列表在主模板错误的声明中是不允许的。是否有可能构建错误或完全不同的东西?
如果需要更多上下文,请告诉我。
【问题讨论】:
-
请说明您是如何包含 boost 标头的(最小可编译示例)。