0
代碼,我有以下代碼:面臨的一個問題,而編譯使用C++地圖
D:/Y24\usr\include/xmemory", line 144: error(483): function
"std::allocator<_Ty>::address(std::_Allocator_base<_Ty>::value_type
&) const [with _Ty=const CosTransactions::otid_t]" has already been
declared
detected during:
instantiation of class
我使用HP:
std::map<
const CosTransactions::otid_t,
std::pair<
CosTransactions::otid_t,
CosTransactions::Coordinator_ptr>,
otid_t_less> XID_Broker_impl::cache;
編譯我如下得到一個錯誤上面的代碼時
-Nonstop C++編譯器?當我刪除地圖中的鍵「const」時,錯誤消失。這是否意味着我不能在地圖中使用「const key」? 請幫我在這個問題上