【发布时间】:2016-08-31 15:25:43
【问题描述】:
我有一段代码可以用 Boost 1.49 正确编译。我将 boost 升级到 1.61,现在我面临如下错误:
错误:没有匹配函数调用 boost::shared_array::shared_array(unsigned char) Boost/boost/smart_ptr/shared_array.hpp:56:注意:候选者是:boost::shared_array::shared_array() [with T = unsigned char] Boost/boost/smart_ptr/shared_array.hpp:45: 注意: boost::shared_array::shared_array(const boost::shared_array&)
代码片段就像
boost::shared_array<uint8_t> val;
constructor():val(0){}
可能的解决方案是什么?
我当前的设置是在 GCC 4.1 版的 linux 机器上。
【问题讨论】:
-
您正在运行什么 linux 环境,其中包含旧版本的 GCC? 4.1 is nearly 10 years old (February 13, 2007)
标签: linux boost shared-ptr