Ticket #20367: 020-map_with_const_string_with_ublic++.patch

File 020-map_with_const_string_with_ublic++.patch, 1.4 KB (added by lxrfvg, 2 years ago)
  • src/metadata.hpp

    a b namespace zmq 
    3131    { 
    3232        public: 
    3333 
    34             typedef std::map <std::string, const std::string> dict_t; 
     34            typedef std::map <std::string, std::string> dict_t; 
    3535 
    3636            metadata_t (const dict_t &dict); 
    3737            virtual ~metadata_t (); 
  • src/socket_base.cpp

    a b  
    2020#include <new> 
    2121#include <string> 
    2222#include <algorithm> 
     23#include <ctype.h> 
    2324 
    2425#include "platform.hpp" 
    2526 
  • src/stream_engine.cpp

    a b void zmq::stream_engine_t::plug (io_thre 
    198198            //  Compile metadata. 
    199199            typedef metadata_t::dict_t properties_t; 
    200200            properties_t properties; 
    201             properties.insert(std::make_pair("Peer-Address", peer_address)); 
     201            properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address)); 
    202202            zmq_assert (metadata == NULL); 
    203203            metadata = new (std::nothrow) metadata_t (properties); 
    204204        } 
    void zmq::stream_engine_t::mechanism_rea 
    805805 
    806806    //  If we have a peer_address, add it to metadata 
    807807    if (!peer_address.empty()) { 
    808         properties.insert(std::make_pair("Peer-Address", peer_address)); 
     808        properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address)); 
    809809    } 
    810810 
    811811    //  Add ZAP properties.