引用:
作者: mjus 代码: //INSERT(x) for a shortcut.
#define INSERT(x) Insert(x.id,x) |
just quickly went through, why this can't be defined as a function template for DB?
as:
代码:
//inside class definition
template<typename T>
bool insert(T x){ return insert(x.id, x); }
if it is only applied to the POD record, the function template can be replaced by the specified recordType.