diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/session/custom/driver.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/session/custom/driver.cxx b/common/session/custom/driver.cxx index 2baa122..ab111b2 100644 --- a/common/session/custom/driver.cxx +++ b/common/session/custom/driver.cxx @@ -14,6 +14,7 @@ #include <odb/database.hxx> #include <odb/session.hxx> #include <odb/transaction.hxx> +#include <odb/details/config.hxx> // ODB_CXX11_* #include <common/common.hxx> @@ -88,7 +89,11 @@ main (int argc, char* argv[]) transaction t (db->begin ()); st = db->load<employer> ("Simple Tech Ltd"); +#ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT ste = db->load<employee> (st->employees ()[0].object_id ()); +#else + ste = db->load<employee> (st->employees ()[0].object_id<employee> ()); +#endif // Test object cache. // @@ -103,7 +108,11 @@ main (int argc, char* argv[]) transaction t (db->begin ()); cs = db->load<employer> ("Complex Systems Inc"); +#ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT cse = db->load<employee> (cs->employees ()[0].object_id ()); +#else + cse = db->load<employee> (cs->employees ()[0].object_id<employee> ()); +#endif cs->employees ()[0].load (); t.commit (); |