From dcb7bcd541f77b280e5733da9ec1eb24574e0d9e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 10 Mar 2011 09:10:09 +0200 Subject: Add default_ctor() to semantics::class_ Use it in the code generators instead of calling the GCC AST macro. --- odb/relational/header.hxx | 5 +---- odb/relational/source.hxx | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'odb/relational') diff --git a/odb/relational/header.hxx b/odb/relational/header.hxx index 12a587d..9394f21 100644 --- a/odb/relational/header.hxx +++ b/odb/relational/header.hxx @@ -6,8 +6,6 @@ #ifndef ODB_RELATIONAL_HEADER_HXX #define ODB_RELATIONAL_HEADER_HXX -#include //@@ ?? - #include #include @@ -601,7 +599,6 @@ namespace relational traverse_object (type& c) { string const& type (c.fq_name ()); - bool def_ctor (TYPE_HAS_DEFAULT_CONSTRUCTOR (c.tree_node ())); semantics::data_member& id (id_member (c)); bool auto_id (id.count ("auto")); @@ -772,7 +769,7 @@ namespace relational // find () // - if (def_ctor) + if (c.default_ctor ()) os << "static pointer_type" << endl << "find (database&, const id_type&);" << endl; diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx index 6f30007..37dfa27 100644 --- a/odb/relational/source.hxx +++ b/odb/relational/source.hxx @@ -6,8 +6,6 @@ #ifndef ODB_RELATIONAL_SOURCE_HXX #define ODB_RELATIONAL_SOURCE_HXX -#include // @@ ?? - #include #include #include @@ -1682,7 +1680,6 @@ namespace relational string traits ("access::object_traits< " + type + " >"); bool grow (context::grow (c)); - bool def_ctor (TYPE_HAS_DEFAULT_CONSTRUCTOR (c.tree_node ())); semantics::data_member& id (id_member (c)); bool auto_id (id.count ("auto")); @@ -2066,7 +2063,7 @@ namespace relational // find () // - if (def_ctor) + if (c.default_ctor ()) { os << traits << "::pointer_type" << endl << traits << "::" << endl -- cgit v1.1