basic_string.h 中 compare(size_type pos1, size_type count1, const_pointer s) const 方法逻辑错误
Author: elsa-elsa-elsaCreated Jan 1, 2025Updated Jan 1, 2025
compare(size_type pos1, size_type count1, const_pointer s) const 方法中return compare_cstr(buffer_ , n1, s, n2); 中第一个参数不对,应该是buffer_ + pos1 ,不应该是buffer_ ,其他类似的compare方法同理
Source: Alinshans/MyTinySTL