From 6ddd44828bcd287c5c832b953e4417fc1c1cb8c7 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 25 Feb 2019 21:46:54 -0600 Subject: [PATCH] [ox/std] Add != to BString --- deps/ox/src/ox/std/string.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deps/ox/src/ox/std/string.hpp b/deps/ox/src/ox/std/string.hpp index efb403e2..83720dc7 100644 --- a/deps/ox/src/ox/std/string.hpp +++ b/deps/ox/src/ox/std/string.hpp @@ -39,6 +39,8 @@ class BString { constexpr bool operator==(const BString &other) noexcept; + constexpr bool operator!=(const BString &other) noexcept; + constexpr char operator[](std::size_t i) const noexcept; constexpr char &operator[](std::size_t i) noexcept; @@ -136,6 +138,11 @@ constexpr bool BString::operator==(const BString &other) noexc return retval; } +template +constexpr bool BString::operator!=(const BString &other) noexcept { + return !operator==(other); +} + template constexpr char BString::operator[](std::size_t i) const noexcept { return m_buff[i];