diff options
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index 8d358cb..a88e16e 100644 --- a/src/common.h +++ b/src/common.h @@ -21,6 +21,10 @@ struct line_view { return o; } + bool operator<(const line_view& lv) const noexcept { + return std::string(line, length) < std::string(lv.line, lv.length); + } + bool operator==(const line_view& lv) const noexcept { const char* p1 = line; const char* p2 = lv.line; |