Implements piping StringView into streams.
continuous-integration/drone/push Build is passing

This commit is contained in:
Deukhoofd committed 2020-07-08 13:28:43 +02:00
1 parent 97b15650f1
commit 950464ae79
2 files changed
+23 -5

No files matched your search

+6 -1
View File
@@ -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