From 3a1eed21d4d5d0e7f6a9f400420fdc28d7be9b61 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 17 Feb 2012 10:08:18 +0200 Subject: Add support for composite object ids New pragma id_type (member). New test: common/composite-id. The composite example has also been updated. --- odb/odb.cxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'odb/odb.cxx') diff --git a/odb/odb.cxx b/odb/odb.cxx index dd9b180..b17369a 100644 --- a/odb/odb.cxx +++ b/odb/odb.cxx @@ -692,6 +692,26 @@ main (int argc, char* argv[]) << "#endif" << endl << endl; + // Add ODB compiler metaprogramming tests. + // + os << "namespace odb" << endl + << "{" << endl + << "namespace compiler" << endl + << "{" << endl; + + // operator< test, used in validator. + // + os << "template " << endl + << "bool" << endl + << "has_lt_operator (T const& x, T const& y)" << endl + << "{" << endl + << "bool r (x < y);" << endl + << "return r;" << endl + << "}" << endl; + + os << "}" << endl + << "}" << endl; + // Add custom prologue if any. // // NOTE: if you change the format, you also need to update code -- cgit v1.1