circular_buffer
circular_buffer copied to clipboard
Avoid UB in debug code
std::memset
calls with a nullptr argument are flagged as UB by GCC -fsanitize=undefined
, so check the size first
See https://godbolt.org/z/Kjch8dd1d for a simple example showing the diagnostics
Fixes #39