KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is following pattern ok/safe ? Or are there any shortcomings ? (I also use it for equality operators) Derived& operator=(const Derived& rhs) { static_cast<Base&>(*this) = rhs; // ... copy member variables of Derived return *this; }
Tags (comma-separated)
Save Edits
Cancel