Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在里面有库类DataForm DataForm::Field。我想使用最新的,但我需要operator ==超载。如何在不修改Field类且不使用继承的情况下做到这一点?如果可能的话有什么办法吗?
DataForm::Field
operator ==
Field
您可以使用免费功能:
bool operator==( const DataForm::Field& lhs, const DataForm::Field& rhs ) { // implement me... }