MCPcopy Create free account
hub / github.com/boostorg/leaf / cmp

Function cmp

test/diagnostics_test1.cpp:144–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 }
143
144 bool cmp(std::string a, std::string const & b) noexcept
145 {
146 remove_variance(a);
147 auto i = a.begin();
148 auto j = b.begin();
149 for( auto e = i + std::min(a.size(), b.size()); i != e; ++i, ++j )
150 if( *i != *j )
151 {
152 std::cout <<
153 "a =\n----\n" << a << "----\n\n"
154 "b =\n----\n" << b << "----\n\n"
155 "Difference immediately after:\n" << std::string(a.begin(), i) << '\n';
156 return false;
157 }
158 return i == a.end() && j == b.end();
159 }
160}
161#endif
162

Callers 1

mainFunction · 0.85

Calls 1

remove_varianceFunction · 0.85

Tested by

no test coverage detected