Regex comparison operator are const

This commit is contained in:
Maxime Coste 2015-04-08 23:16:27 +01:00
parent b5ab318a2d
commit da09da29c4

View File

@ -26,8 +26,8 @@ struct Regex : std::regex
: std::regex(begin, end, flags), m_str(begin, end) {}
bool empty() const { return m_str.empty(); }
bool operator==(const Regex& other) { return m_str == other.m_str; }
bool operator!=(const Regex& other) { return m_str != other.m_str; }
bool operator==(const Regex& other) const { return m_str == other.m_str; }
bool operator!=(const Regex& other) const { return m_str != other.m_str; }
const String& str() const { return m_str; }