When I read the Wiki , I saw there are two parameters in command zadd :
const std::vectorstd::string options , const std::mapstd::string,std::string score_member
At first I was confused that why were these two parameters constants instead of const reference , I thought it must be wrong in Wiki.So I have made a test:
redis_client m_client;
std::vector options{"NX"};
std::mapstd::string,std::string m1;
m1.insert({"0","a"},{"1","b"});
m_client.connect();
m_client.zadd("test:1",options,m1);
Compile successful,so I think the type of these two parameters are const reference instead of const.