Commit 217e0ae9 authored by Ewen McNeill's avatar Ewen McNeill

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.
parent 6b21b1ec
......@@ -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 ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment