Skip to content

Commit

Permalink
fixed_string: remove useless operators
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice committed Jan 16, 2021
1 parent 1caebea commit c264fdc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions include/protopuf/fixed_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace pp {
};

template <typename CharT, std::size_t N, std::size_t M>
constexpr auto operator==(const basic_fixed_string<CharT, N> &l, const basic_fixed_string<CharT, M> &r) {
constexpr bool operator==(const basic_fixed_string<CharT, N> &l, const basic_fixed_string<CharT, M> &r) {
if (N != M) {
return false;
}
Expand All @@ -48,11 +48,6 @@ namespace pp {
return true;
}

template <typename CharT, std::size_t N, std::size_t M>
constexpr auto operator!=(const basic_fixed_string<CharT, N> &l, const basic_fixed_string<CharT, M> &r) {
return !(l == r);
}

template <typename CharT, std::size_t N, std::size_t M>
constexpr auto operator<=>(const basic_fixed_string<CharT, N> &l, const basic_fixed_string<CharT, M> &r) {
for (std::size_t i = 0; i < std::min(N, M); ++i) {
Expand Down

0 comments on commit c264fdc

Please sign in to comment.