diff --git a/deps/ox/src/ox/std/string.hpp b/deps/ox/src/ox/std/string.hpp index 6714eec4..5cd9d215 100644 --- a/deps/ox/src/ox/std/string.hpp +++ b/deps/ox/src/ox/std/string.hpp @@ -193,11 +193,21 @@ class BasicString { return static_cast(m_buff.data()); } + [[nodiscard]] + inline explicit operator const char*() const { + return c_str(); + } + #ifdef OX_USE_STDLIB [[nodiscard]] inline std::string toStdString() const { return c_str(); } + + [[nodiscard]] + inline explicit operator std::string() const { + return c_str(); + } #endif /** @@ -271,8 +281,7 @@ constexpr BasicString::BasicString(const BasicString &other) no } template -constexpr BasicString::BasicString(BasicString &&other) noexcept { - m_buff = std::move(other.m_buff); +constexpr BasicString::BasicString(BasicString &&other) noexcept: m_buff(std::move(other.m_buff)) { } template