[odb-users] Containers of containers

MM finjulhich at gmail.com
Sun Jan 12 15:31:20 EST 2025


On Sun, 12 Jan 2025 at 09:09, MM <finjulhich at gmail.com> wrote:

> On Wed, 9 Oct 2024 at 13:23, Boris Kolpackov <boris at codesynthesis.com>
> wrote:
>
> > MM <finjulhich at gmail.com> writes:
> >
> > > Trying to compile and understand the experimental facility of vectors
> of
> > > vectors, I can't odb compile  the example here [...]
> >
> > We have added a complete example that shows how to do this:
> >
> >
> >
> https://git.codesynthesis.com/cgit/odb/odb/tree/odb-examples/container-nested
> >
> > Note that you will need to grab the updated odb/nested-container.hxx
> > header (until the next release of ODB) since we tweaked it a bit to
> > streamline the mapping:
> >
> >
> >
> https://git.codesynthesis.com/cgit/odb/odb/tree/libodb/odb/nested-container.hxx
>
>
> After I cloned
> >>> git remote -v
> origin  https://git.codesynthesis.com/odb/odb-examples.git (fetch)
> origin  https://git.codesynthesis.com/odb/odb-examples.git (push)
>
> I only see the *container* directory, not the *container-nested* direction.
>
> >>> git branch -l
> master
>
> How come?


I simply manually copied those files and the driver test works.

My use case is a little extra on top of the vector<trip> case.
What is *trip* is not actually just a vector<country_stay> but somethine
like

struct trip {
   double d1;
   int d2;
   vector<country_stay> d3;
};

how do I change that example code?


More information about the odb-users mailing list