
On Tue, Dec 3, 2024 at 10:07 PM Vinnie Falco <vinnie.falco@gmail.com> wrote:
On Tue, Dec 3, 2024 at 12:09 PM Peter Dimov via Boost < boost@lists.boost.org> wrote:
pair<string, string>( "foo", "bar" ) pair<string, string>( "foob", "ar" ) pair<string, string>( "fooba", "r" )
But....but... in each of these cases where there are two strings, the strings also submit their size after the data, thus these would not be equivalent:
{ "foo", 3, "bar", 3 } { "foob", 4, "ar", 2 } { "fooba", 5, "r", 1 }
Or am I missing something?
Thanks
Yes, currently it works fine(as you described). Peter was using that as an example why we add size of range when hashing. To avoid collisions like this. I was basically asking why hash_append of span<char> also hashes span size since I expected it just consume the bytes span points to.