Skip to main content
WalderFrey's user avatar
WalderFrey's user avatar
WalderFrey's user avatar
WalderFrey
  • Member for 12 years, 11 months
  • Last seen more than 4 years ago
awarded
awarded
awarded
awarded
awarded
awarded
accepted
comment
'Assigning' a base class to a derived class?
Thanks Nicol. Your answer looks to be bang on the money. I believe that the developer simply wanted to 'add' a few member variables to an existing struct, and used inheritance exactly as you suggest to expose the base class's members. Your improved syntax for the assignment is much appreciated.
comment
'Assigning' a base class to a derived class?
@rwong Nope, no constructors; just member variables in both.
comment
'Assigning' a base class to a derived class?
@Deduplicator: alas, it doesn't work (at least not in MSVC): no acceptable conversion.
asked
Loading…
Loading…
revised
C++ class design with invariant
added 1 character in body
Loading…
awarded
revised
C++ class design with invariant
deleted 1 character in body
Loading…
awarded
asked
Loading…