[odb-users] base class, derived, separate headers and derived references base

Boris Kolpackov boris at codesynthesis.com
Fri Jul 3 13:35:07 EDT 2015


MM <finjulhich at gmail.com> writes:

> dir1/A.hpp
> ===================
> namespace NS
> {
> 
> struct A {
> ...
> ...const T* underlying;
> ...
> };
> struct selector {
>   int id;
>   int type;
> };
> void set_A_underlying(A&, const selector&);
> 
> }
> 
> 
> dir1_odb/A.hpp
> ====================
> #include <odb/core.hxx>
> namespace NS
> {
> #pragma db value(selector) definition
> 
> #pragma db object(A) table("A") definition
> #pragma db member(A::underlying) transient
> #pragma db member(A::ulid) virtual(selector) \
>   get( selector(this.underlying->type(), this.underlying->id)) \
>   set(set_A_underlying (this,(?)))
> }

What is a 'T' in A? Send a complete, compilable test case that
reproduces the problem.

Boris



More information about the odb-users mailing list