Cylix / cpp_redis

C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform - NO LONGER MAINTAINED - Please check https://github.com/cpp-redis/cpp_redis
MIT License
1.25k stars 554 forks source link

cpp_redis::reply::as_double() #186

Open whackashoe opened 6 years ago

whackashoe commented 6 years ago

Looking to turn a reply into a double. cpp_redis::reply::as_double() doesn't seem to exist, I'm curious if this is intentional?

I think it'd make more sense for the reply class to support a redis_string which could be casted to std::string, int, float_t. The other types as list, set, hash, and zset could sit alongside the redis_string as types for the reply to cast to, while also using redis_string as type for k/v.