mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Provide ostream output for StringRef.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@@ -523,6 +524,11 @@ namespace llvm {
|
||||
return buffer.append(string.data(), string.size());
|
||||
}
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &os, StringRef string) {
|
||||
os.write(string.data(), string.size());
|
||||
return os;
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
||||
// StringRefs can be treated like a POD type.
|
||||
|
||||
Reference in New Issue
Block a user