我想在std::map中将一个可移动但不可复制的类型作为一个值。这里有一些简单的代码来测试这个原理。/include/c++/4.5.1/bits/stl_algobase.h:66:0,
from /usr/local/lib/gcc/i686-pc-linux-gnu/include/c++/4.5.1/bits/stl_tree.h:6
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_function.h: In member function ‘bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = id]’:
/usr/lib/gcc/i686-pc-linux
std::map<std::string, A> p;}
该汇编是成功的。/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/
/include/c++/4.9.2/bits/stl_algobase.h:64:
/usr/local/bin/../include/c++/4.9.2/bits/stl_pair.h:119:22: error: call to constructor of 'std::map<int, char, std::less/include/c++/4.9.
/stlport/stl/_unordered_map.h:24,
from ../stlport/stl/_unordered_map.h:130:22: instantiated from ‘_Tp& stlp_std::unordered_map<_Key, _Tp, _HashFcn/stlport/stl/_unordered_m