We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c02408 commit fccf28eCopy full SHA for fccf28e
src/common/String.h
@@ -52,6 +52,11 @@ namespace Str {
52
: ptr(other.c_str()), len(other.size()) {}
53
BasicStringRef(const T* other)
54
: ptr(other), len(std::char_traits<T>::length(other)) {}
55
+ BasicStringRef(const T* start, size_t len)
56
+ : ptr(start), len(len)
57
+ {
58
+ DAEMON_ASSERT_EQ(start[len], '\0');
59
+ }
60
61
const T& operator[](size_t pos) const
62
{
0 commit comments