Replace string with basic_string<T>

This commit is contained in:
King_DuckZ 2021-05-28 02:48:49 +02:00
parent d0e7ca0bee
commit 1ec0e143fd

View file

@ -54,8 +54,8 @@ namespace dhandy {
constexpr std::basic_string_view<T> to_string_view() const { return to<std::basic_string_view<T>>(); } constexpr std::basic_string_view<T> to_string_view() const { return to<std::basic_string_view<T>>(); }
bool operator== (const std::basic_string_view<T>& other) const { return to_string_view() == other; } bool operator== (const std::basic_string_view<T>& other) const { return to_string_view() == other; }
bool operator!= (const std::basic_string_view<T>& other) const { return not operator==(other); } bool operator!= (const std::basic_string_view<T>& other) const { return not operator==(other); }
bool operator== (const std::string& other) const { return to_string_view() == other; } bool operator== (const std::basic_string<T>& other) const { return to_string_view() == other; }
bool operator!= (const std::string& other) const { return not operator==(other); } bool operator!= (const std::basic_string<T>& other) const { return not operator==(other); }
bool operator== (const T* other) const { return to_string_view() == std::basic_string_view<T>(other); } bool operator== (const T* other) const { return to_string_view() == std::basic_string_view<T>(other); }
bool operator!= (const T* other) const { return not operator==(other); } bool operator!= (const T* other) const { return not operator==(other); }
#endif #endif