记录一个编译错误,编译错误如下:
error C2664: “void std::map<float,double,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>::swap(std::map<_Kty,_Ty,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &) noexcept(<expr>)”: 无法将参数 1 从“std::map<float,double,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>
在代码上体现如下:
解决方案:将属性 -> C/C++ -> 符合模式 -> 否
改后,代码正常了
具体原因没有深究,但由于该错误发生了两次,为了长记性,特此记录!——辉 2022.12.8