[odb-users] Pimpl + Relations
cetoni GmbH - Uwe Kindler
uwe.kindler at cetoni.de
Tue Oct 2 08:38:59 EDT 2012
Hi Boris,
thank you - yes you are right, this was a mistake, but also with your
suggestion it does not work here. I now have the following two lines in
my code:
typedef boost::shared_ptr<CLens> LensPtr;
#pragma db member(Lens1) virtual(LensPtr) get(lens) set(setLens)
#pragma db member(Lens2) virtual(boost::shared_ptr<CLens>) get(lens)
set(setLens)
For the last line I get the ODB compiler error: name 'boost::shared_ptr'
in db pragma virtual does not refer to a type
and for the second line of code I get the error: error: modifier
expression requires member type to be default-constructible
So does this mean I cannot use shared pointers in virtual members? Does
this mean, I should use a shared CLens pointer only internally in my
private class and use const CLens references in the access functions?
Thank you,
Uwe
More information about the odb-users
mailing list