[odb-users] Persisting class instantiated from a template

Balázs Bayer balazs.bayer at gmail.com
Wed Mar 15 13:29:02 EDT 2017


When I tried with this one:

#pragma db value(ResultFloatSeven) definition transient
#pragma db member(ResultFloatSeven::Id_) virtual(int)
#pragma db member(ResultFloatSeven::Value_) virtual(float)

I got the following errors:

result-mapping.hpp:12:12: error: virtual data member declaration 'Id'
conflicts with a previous declaration
result.hpp:41:7: info: 'Id' was previously declared here
result-mapping.hpp:12:12: error: virtual data member declaration 'Id'
conflicts with a previous declaration
result.hpp:41:7: info: 'Id' was previously declared here

and with this one:

#pragma db value(ResultFloatSeven) definition

the followings:

result.hpp:42:31: error: data member 'Values' is private and no suitable
accessor function could be automatically found
result.hpp:42:31: info: consider making class 'odb::access' a friend of
class 'ResultFloatSeven'
result.hpp:42:31: info: or use '#pragma db get' to explicitly specify the
accessor function or expression
result.hpp:42:31: error: data member 'Values' is private and no suitable
accessor function could be automatically found
result.hpp:42:31: info: consider making class 'odb::access' a friend of
class 'ResultFloatSeven'
result.hpp:42:31: info: or use '#pragma db get' to explicitly specify the
accessor function or expression


More information about the odb-users mailing list