[odb-users] Use of shared database pointer in lazy_ptr

Stath Paul pstath at axxcelera.com
Thu Dec 13 08:48:12 EST 2012


Boris --

I was wondering if there is any way I can utilize a shared pointer to odb::database when I need to construct a lazy pointer.

I store my odb::database in a shared pointer.
When I construct a lazy pointer, I don't like to borrow the reference to the database from the shared pointer.
Seems sloppy, since it may be possible to deconstruct the shared pointer to be database, but still have a dangling
pointer to the database in the lazy pointer.

-- Paul Stath



More information about the odb-users mailing list