[odb-users] Probably a BUG in
libodb-boost-2.3.0/odb/boost/multi-index/container-traits.hxx
- EASY TO FIX
Esben Zeuthen
esbenzeuthen at gmail.com
Tue Sep 23 16:55:59 EDT 2014
When compiling with option "--profile boost", I got a mapping error for any
multi_index_container member:
../model/Automat.h:113:11: error: unable to map C++ type
'::tinemo::model::Automat::emails' used in data member 'emails_' to a MySQL
database type
../model/Automat.h:113:11: info: use '#pragma db type' to specify the
database type
I looked in the file
libodb-boost-2.3.0/odb/boost/multi-index/container-traits.hxx trying to
figure out why my multi index container was not mapped correctly, and I
found this in the very start of the header file:
#ifndef ODB_BOOST_UNORDERED_CONTAINER_TRAITS_HXX
#define ODB_BOOST_UNORDERED_CONTAINER_TRAITS_HXX
Now, this is not the unordered container traits definitions, it is the
multi index container definitions. I looked into file
libodb-boost-2.3.0/odb/boost/unordered/container-traits.hxx and found the
exact same directives as listed above. The multi index container header
definitions are not included, if the unordered container header has been
previously included. I verified this by compiling with profiles
boost/smart-ptr and boost/multi-index only. This time I got no mapping
error, and SQL code for my multi index container table has been generated.
Unless the two subprofiles are mutually exclusive, I suggest changing the
#ifndef/#define directives to allow them to co-exist.
Best,
Esben
More information about the odb-users
mailing list