[odb-users] Problem declaring templated class as composite value type

Andor Pathó andor.patho at dlubal.cz
Wed Jan 4 05:13:38 EST 2012


I am currently evaluating ODB as an ORM solution for an upcoming project 
and came across the following problem:

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.
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:

terminate called after throwing an instance of 
   what():  N4cutl8compiler7context8no_entryE

This application has requested the Runtime to terminate it in an unusual 
Please contact the application's support team for more information.
*** WARNING *** there are active plugins, do not report this as a bug 
unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_START_UNIT                | odb
PLUGIN_PRAGMAS                   | odb
PLUGIN_OVERRIDE_GATE             | odb
In file included from 
                  from <standard-odb-epilogue>:9:
internal compiler error: Aborted

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 

More information about the odb-users mailing list