Skip to content
This repository was archived by the owner on Apr 6, 2019. It is now read-only.

A problem of parameter type in command redis_client::zadd() #99

@guanhonly

Description

@guanhonly

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions