Greetings. I was not able to find a specific bug on my MacOSX (arm64) machine compiling with clang, but the use of size_t does not seem to be correct because the compiler could be using a 16 bit value for size_t. This patch uses only diff_t from the iterator instead and directly pulls in the code from the tiny swap_offsets method as that avoids passing diff_t. See https://en.cppreference.com/w/cpp/types/size_t
Greetings. I was not able to find a specific bug on my MacOSX (arm64) machine compiling with clang, but the use of size_t does not seem to be correct because the compiler could be using a 16 bit value for size_t. This patch uses only diff_t from the iterator instead and directly pulls in the code from the tiny swap_offsets method as that avoids passing diff_t. See https://en.cppreference.com/w/cpp/types/size_t