jamesge commented on a change in pull request #972: Redis server protocol URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r354715582
########## File path: src/brpc/redis_reply.h ########## @@ -203,6 +306,11 @@ inline size_t RedisReply::size() const { return (is_array() ? _length : 0); } +inline RedisReply& RedisReply::operator[](size_t index) { + return const_cast<RedisReply&>( + const_cast<const RedisReply*>(this)->operator[](index)); Review comment: 这么写比较危险 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org