From 0da5c0de3cafbb4b6944ddeb8eca0a4d714861ea Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Mon, 28 Nov 2016 16:03:07 +0000 Subject: [PATCH] Add missing implementation for get(). --- src/reply.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/reply.cpp b/src/reply.cpp index c3aaf2a..eb2be05 100644 --- a/src/reply.cpp +++ b/src/reply.cpp @@ -79,10 +79,22 @@ namespace redis { return get_error_string(parReply); } + template <> + const StatusString& get (const Reply& parReply) { + static const char empty_str[1] = ""; + static const StatusString empty_status(empty_str, 0); + if (parReply.is_nil()) + return empty_status; + + assert(parReply.is_status()); + return boost::get(parReply); + } + template const std::string& get ( const Reply& parReply ); template const std::vector& get> ( const Reply& parReply ); template const long long& get ( const Reply& parReply ); template const ErrorString& get ( const Reply& parReply ); + template const StatusString& get ( const Reply& parReply ); bool Reply::is_integer() const { return RedisVariantType_Integer == this->which();