Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cb: Fix uninitialized memory used for equality check #5027
@0xc0170 The POD restriction on memxxx is for external use. The Callback is aware of its own operations and makes sure not to break their assumptions.
The Callback is already handling it's own memory explicitly:
@bulislaw agreed, this was just a quick patch so I didn't have time but good idea to track
That's the best fix for now however it might be a good thing to precise that comparison operation won't work if the callback class host a Function like object which is not a standard layout type.
Providing a complete, correct solution for all case is a not a trivial task. Indeed, there is no
operator== to compare an
std::function to another
std::function in the standard library.