[odb-users] Compilation issue with gcc

Boris Kolpackov boris at codesynthesis.com
Fri Jun 3 11:48:17 EDT 2016


Hi Pierre-Olivier,

Pierre-Olivier Rocher <trynitron at gmail.com> writes:
 
> template<typename T>
> inline bool data<T>::erase(const int fm_id)
> {
>    m_database->erase<T>(fm_id);

Try to add template after ->:

m_database->template erase<T>(fm_id);


> [...]
>
> #pragma db id auto
> unsigned long m_id;

While this should work, note that long could be longer than int
which means you may get incorrect result for sufficiently large
ids.

Boris



More information about the odb-users mailing list