[odb-users] Re: naming first and second columns of std::pair
MM
finjulhich at gmail.com
Thu Mar 19 08:47:13 EDT 2015
On 18 March 2015 at 20:11, MM <finjulhich at gmail.com> wrote:
> hello,
>
> I have this struct:
>
> /// main header file
> typedef std::pair<double, double> possizethresh_df_t;
> typedef std::vector< possizethresh_df_t > dftiers_t;
> struct S {
> ...
> dftiers_t dftiers;
> ...
> };
>
>
> /// odb-specific header file
> #pragma db object(S)
> #pragma db value(possizethresh_df_t)
>
> Is there a way to give a name to the columns resulting from the 2 doubles
> in the pair?
>
> Rds,
>
I've got it:
#pragma db value(possizethresh_df_t) definition
#pragma db member(possizethresh_df_t::first) column("possizeuplmt")
#pragma db member(possizethresh_df_t::second) column("depfactor")
I thought the "member" was just for object types, not for value types also,
Rds,
More information about the odb-users
mailing list