std::memcmp for for loops