2 ms·
You've missed the 'functionally equal' check option; which covers cases like you're focusing on. To check if two differently created things happen to be equal,
by mjevans 7y ago
You've missed the 'functionally equal' check option; which covers cases like you're focusing on.
To check if two differently created things happen to be equal, yes, you should prefer the function that checks exactly what matters exactly how it matters.
As you rightly point out, the memcmp check would only work on either pre-zeroed memory (depends on environment and what you're doing) or actual literal copies of a specific struct.