[odb-users] Problem declaring templated class as composite
boris at codesynthesis.com
Fri Jan 6 03:49:02 EST 2012
Andor Pathó <andor.patho at dlubal.cz> writes:
> I need to map a templated class (it is a classic 3d vector type with 3
> numeric components) as a composite value.
> If I try adding #pragma db value to the templated class declaration, the
> odb compiler does not recognize the class declaration, presumably
> because of the template declaration.
Yes, composite class templates are not yet supported. Though we will
probably support them at some point in the future (for this we will
have to generate templated code which will require some additional
infrastructure in the ODB compiler).
> If I try using #pragma db value(vector3d), where vector3d is a typedef
> for a template specialization of the templated vector type, the odb
> compiler crashes:
> I am not sure whether this is a bug, or mapping template classes is not
> supported in ODB at all, as I have found no mention of it in the
While we do not support this at the moment, I checked the code and I
don't see any reason why we shouldn't support this case. I will try
to implement this later today and will get back to you.
More information about the odb-users