Contents

Parameters

Return value

Negative value if the first differing byte (reinterpreted as unsignedchar) in lhs is less than the corresponding byte in rhs.

​0​ if all count bytes of lhs and rhs are equal.

Positive value if the first differing byte in lhs is greater than the corresponding byte in rhs.

Notes

This function reads object representations, not the object values, and is typically meaningful for trivially-copyable objects only. For example, memcmp() between two objects of type std::string or std::vector will not compare their contents.