当我宣布的unique_ptr的一个载体,我得到这样的错误:的std ::向量<性病::的unique_ptr <int>>不编译
d:\qt\mingw64\include\c++\4.8.0\bits\stl_construct.h:75: error:
use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(
const std::unique_ptr<_Tp, _Dp>&) [with _Tp = int; _Dp = std::default_delete<int>]'
,它看起来像创建的容器的经典错误没有拷贝构造函数的对象。
但是,在所有我能找到的标准unique_ptrs容器工作归功于C++ 11移动语义。
我正在用MinGW-gcc 64位编译,使用-std = gnu ++ 11。
仅支持C++ 11而不支持gnu ++ 11吗?
谢谢
为什么不尝试使用C++ 11? – juanchopanza
'4.8.0'它不符合C + 11,任何从'4.8.1'开始的发布都是 – user2485710
请看以下链接:http://stackoverflow.com/q/10613126/2724703 –