aboutsummaryrefslogtreecommitdiff
path: root/odb/semantics/class.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/semantics/class.cxx')
-rw-r--r--odb/semantics/class.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/odb/semantics/class.cxx b/odb/semantics/class.cxx
index 2d35a17..8c6877b 100644
--- a/odb/semantics/class.cxx
+++ b/odb/semantics/class.cxx
@@ -24,7 +24,13 @@ namespace semantics
bool class_::
default_ctor () const
{
- return TYPE_HAS_DEFAULT_CONSTRUCTOR (tree_node ());
+ tree t (tree_node ());
+
+ // TYPE_HAS_DEFAULT_CONSTRUCTOR() returns true if we have a
+ // deleted default ctor. locate_ctor(), on the other hand,
+ // returns NULL_TREE in this case.
+ //
+ return TYPE_HAS_DEFAULT_CONSTRUCTOR (t) && locate_ctor (t) != NULL_TREE;
}
bool class_::