[odb-users] shared pointers to abstract classes

Boris Kolpackov boris at codesynthesis.com
Thu Jul 24 06:20:31 EDT 2014

Hi Dan,

first last <armz4pxq at gmail.com> writes:

> How can I make persistent a class that has as a member a pointer to an
> abstract class.
> class employer {
>     shared_ptr<person> employee;  // this can be either an operator or a programmer
> }

By using polymorphic inheritance (Section 8.2 in the manual).


More information about the odb-users mailing list