managarm / frigg

Lightweight C++ utilities and algorithms for system programming
MIT License
56 stars 20 forks source link

string: minor improvements and fixing operator== issues #19

Closed no92 closed 2 years ago

no92 commented 2 years ago

Reworked operator== due to a single instance of a line like if(ret.name == "") with ret.name being of type frg::string<something> in mlibc complaining. This solution is in line with what the C++ spec says (N4835 21.3.3.2 [string.cmp]).

Geertiebear commented 2 years ago

Does this change not cause the exact same warning that #18 fixed?

no92 commented 2 years ago

To my own surprise, no. Both managarm-kernel and mlibc compile, the former (where the warning originally appeared) even with -Wimplicit-fallthrough -Werror.