forked from OctaForge/libostd
fixes
parent
b51e84c8b0
commit
809e4825ae
|
@ -151,6 +151,6 @@ static inline void writeln(const T &v, const A &...args) {
|
||||||
putc('\n', ::stdout);
|
putc('\n', ::stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} /* namespace octa */
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -115,6 +115,7 @@ struct StringRangeBase: InputRange<
|
||||||
T &operator[](octa::Size i) const { return p_beg[i]; }
|
T &operator[](octa::Size i) const { return p_beg[i]; }
|
||||||
|
|
||||||
void put(T v) {
|
void put(T v) {
|
||||||
|
if (empty()) return;
|
||||||
*(p_beg++) = v;
|
*(p_beg++) = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,6 +157,9 @@ public:
|
||||||
|
|
||||||
StringBase(const A &a = A()): p_buf(1, '\0', a) {}
|
StringBase(const A &a = A()): p_buf(1, '\0', a) {}
|
||||||
|
|
||||||
|
StringBase(Size n, const T &val = T(), const A &al = A()):
|
||||||
|
p_buf(n + 1, val, al) {}
|
||||||
|
|
||||||
StringBase(const StringBase &s): p_buf(s.p_buf) {}
|
StringBase(const StringBase &s): p_buf(s.p_buf) {}
|
||||||
StringBase(const StringBase &s, const A &a):
|
StringBase(const StringBase &s, const A &a):
|
||||||
p_buf(s.p_buf, a) {}
|
p_buf(s.p_buf, a) {}
|
||||||
|
|
Loading…
Reference in New Issue