mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
Remove "const" from std::map key
Updated: src/metdata.hpp: Remove explicit "const" from key of std::map<> because the key is implicitly const already (see http://en.cppreference.com/w/cpp/container/map and http://www.cplusplus.com/reference/map/map/). On some platforms (such as z/OS UNIX System Services) explicitly declaring the map key as "const" causes template expansion errors as it tries to create separate allocators for "const const std::string" and "const std::string" only to find that they clash. (Presumably some compilers collapse these into one earlier.) There are no template expansion errors if the map key is left to be implicitly const.
This commit is contained in:
parent
6b21b1ecfa
commit
217e0ae9c6
@ -31,7 +31,7 @@ namespace zmq
|
||||
{
|
||||
public:
|
||||
|
||||
typedef std::map <const std::string, const std::string> dict_t;
|
||||
typedef std::map <std::string, const std::string> dict_t;
|
||||
|
||||
metadata_t (const dict_t &dict);
|
||||
virtual ~metadata_t ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user