summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/relational/header.hxx5
-rw-r--r--odb/relational/source.hxx5
-rw-r--r--odb/semantics/class.cxx8
-rw-r--r--odb/semantics/class.hxx4
4 files changed, 14 insertions, 8 deletions
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 <odb/gcc.hxx> //@@ ??
-
#include <odb/relational/context.hxx>
#include <odb/relational/common.hxx>
@@ -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 <odb/gcc.hxx> // @@ ??
-
#include <map>
#include <set>
#include <vector>
@@ -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
diff --git a/odb/semantics/class.cxx b/odb/semantics/class.cxx
index 49dbade..6d1621a 100644
--- a/odb/semantics/class.cxx
+++ b/odb/semantics/class.cxx
@@ -3,6 +3,8 @@
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license : GNU GPL v3; see accompanying LICENSE file
+#include <odb/gcc.hxx> // TYPE_HAS_DEFAULT_CONSTRUCTOR
+
#include <cutl/compiler/type-info.hxx>
#include <odb/semantics/class.hxx>
@@ -20,6 +22,12 @@ namespace semantics
{
}
+ bool class_::
+ default_ctor () const
+ {
+ return TYPE_HAS_DEFAULT_CONSTRUCTOR (tree_node ());
+ }
+
// type info
//
namespace
diff --git a/odb/semantics/class.hxx b/odb/semantics/class.hxx
index 924cfdd..2d86cff 100644
--- a/odb/semantics/class.hxx
+++ b/odb/semantics/class.hxx
@@ -88,6 +88,10 @@ namespace semantics
}
public:
+ bool
+ default_ctor () const;
+
+ public:
class_ (path const&, size_t line, size_t column, tree);
void