diff --git a/include/amqpcpp/address.h b/include/amqpcpp/address.h index 796ac42..8732e49 100644 --- a/include/amqpcpp/address.h +++ b/include/amqpcpp/address.h @@ -27,6 +27,21 @@ namespace AMQP { */ class Address { +private: + /** + * Helper class to do case insensitive comparison + */ + struct icasecmp + { + /** + * Comparison operator <. Should exhibit SWO. + * @param lhs + * @param rhs + * @return bool lhs < rhs + */ + bool operator() (const std::string& lhs, const std::string& rhs) const { return strcasecmp(lhs.c_str(), rhs.c_str()) < 0; } + }; + private: /** * The auth method @@ -62,7 +77,7 @@ private: * Extra provided options after the question mark /vhost?option=value * @var std::map */ - std::map _options; + std::map _options; /** * The default port @@ -256,7 +271,7 @@ public: * Get access to the options * @return std::map */ - const std::map &options() const + const decltype(_options) &options() const { return _options; }