Implements piping StringView into streams.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#ifndef ARBUTILS_BASICSTRINGVIEW_HPP
|
||||
#define ARBUTILS_BASICSTRINGVIEW_HPP
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
namespace ArbUt {
|
||||
@@ -28,7 +29,11 @@ namespace ArbUt {
|
||||
virtual constexpr bool operator!=(const std::string_view& rhs) const noexcept = 0;
|
||||
virtual constexpr bool operator==(const char* rhs) const noexcept = 0;
|
||||
virtual constexpr bool operator!=(const char* rhs) const noexcept = 0;
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& out, const BasicStringView& c) {
|
||||
out << c.c_str();
|
||||
return out;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // ARBUTILS_BASICSTRINGVIEW_HPP
|
||||
|
||||
Reference in New Issue
Block a user