diff --git a/src/chat/chat-room/chat-room-id.h b/src/chat/chat-room/chat-room-id.h index f0340d871..c78a2b51f 100644 --- a/src/chat/chat-room/chat-room-id.h +++ b/src/chat/chat-room/chat-room-id.h @@ -51,12 +51,14 @@ private: LINPHONE_END_NAMESPACE // Add map key support. -template<> -struct std::hash { - std::size_t operator() (const LinphonePrivate::ChatRoomId &chatRoomId) const { - return hash()(chatRoomId.getPeerAddress().asString()) ^ - (hash()(chatRoomId.getLocalAddress().asString()) << 1); - } -}; +namespace std { + template<> + struct hash { + std::size_t operator() (const LinphonePrivate::ChatRoomId &chatRoomId) const { + return hash()(chatRoomId.getPeerAddress().asString()) ^ + (hash()(chatRoomId.getLocalAddress().asString()) << 1); + } + }; +} #endif // ifndef _CHAT_ROOM_ID_H_