I know it is an old thread, but I thought I would add this in case someone else has the same question.
There is a new, open-source, compiler-based ORM system for C++ called ODB. The big difference between ODB and the other libraries mentioned above is that ODB allows you to persist C++ objects to a relational database without manually writing any mapping code.
The C++ code that performs the conversion between persistent classes and their database representation is automatically generated by the ODB compiler. The ODB compiler is a real C++ compiler except that instead of producing assembly or machine code, it generates portable C++ which can in turn be compiled by any C++ compiler.
Here is an example of a persistent class declaration in a C++ header:
#pragma db object
friend class odb::access;
#pragma db id auto
unsigned long id_;
unsigned short age_;
Given this class, we can perform various database operations with its objects:
person john ("John", "Doe", 31);
person jane ("Jane", "Doe", 29);
transaction t (db.begin ());
result r (db.query (query::last == "Doe" && query::age (cout, "\n"));
jane.age (jane.age () + 1);
ODB is cross-platform and cross-database. Check it out.