Skip to content

Commit 9d0cd98

Browse files
committed
add literal ==
1 parent ee03159 commit 9d0cd98

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rpp/utility.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,15 @@ struct Literal {
584584
}
585585
}
586586

587+
constexpr bool operator==(const Literal& other) const noexcept {
588+
for(u64 i = 0; i < max_len; i++) {
589+
if(c_string[i] != other.c_string[i]) {
590+
return false;
591+
}
592+
}
593+
return true;
594+
}
595+
587596
[[nodiscard]] constexpr operator const char*() const noexcept {
588597
return c_string;
589598
}

0 commit comments

Comments
 (0)