我有一個代碼,可以用Boost 1.49正確編譯。我升級提升到1.61,現在我面對錯誤,如:Boost智能陣列不能正常工作
error: no matching function for call to boost::shared_array::shared_array(unsigned char) Boost/boost/smart_ptr/shared_array.hpp:56: note: candidates are: boost::shared_array::shared_array() [with T = unsigned char] Boost/boost/smart_ptr/shared_array.hpp:45: note: boost::shared_array::shared_array(const boost::shared_array&)
代碼snippate就像
boost::shared_array<uint8_t> val;
constructor():val(0){}
可能是什麼造成這種情況的可能的解決方案?
我的當前設置是一臺Linux機器使用GCC 4.1版上。
什麼linux環境下,你運行一個包含GCC的一個古老的版本? [4.1近10歲(2007年2月13日)](https://gcc.gnu.org/releases.html) – sehe