Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • This smells of a lack of default constructors for each of the types. This might be at the issue when attempting to cast and receiving the noted error. Commented Mar 15, 2011 at 15:01
  • The first line is not trying to invoke the assignment operator. It is trying to convert m_baseType to type DerivedType, then copy that using the copy constructor. Commented Mar 15, 2011 at 18:51
  • There is no copy constructor call in the first line. If anything, the default constructor of the DerivedType would be invoked, followed by an attempt to invoke an assignment operator, if one existed with the BaseType as the argument. Commented Mar 15, 2011 at 19:18