From 24f87489a4d315cc01ca9d49a3f0209522fe6729 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 8 Jan 2012 17:27:40 +0200 Subject: Add support for defining composite value type as class template instantiations --- composite/driver.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'composite/driver.cxx') diff --git a/composite/driver.cxx b/composite/driver.cxx index 56be15d..346e768 100644 --- a/composite/driver.cxx +++ b/composite/driver.cxx @@ -27,7 +27,7 @@ main (int argc, char* argv[]) // unsigned int id; { - person p ("Joe", "Dirt", "Mr"); + person p ("Joe", "Dirt", "Mr", phone_numbers ("555 5555", "666 6666")); transaction t (db->begin ()); id = db->persist (p); @@ -49,7 +49,7 @@ main (int argc, char* argv[]) t.commit (); } - // Print the name information. + // Print the name and phone numbers. // { transaction t (db->begin ()); @@ -71,6 +71,9 @@ main (int argc, char* argv[]) { cout << " alias: " << i->first () << " " << i->last () << endl; } + + cout << " phone 1: " << joe->phone ().first << endl; + cout << " phone 2: " << joe->phone ().second << endl; } // Query the database for a person object. -- cgit v1.1