aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-04-29 15:26:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-29 15:26:48 +0200
commitaacc631ed51b97eadfcbc8f4f8401171ef730a13 (patch)
treeaf04fd42f980e2255873ee34c159b99d48b2389a
parent6f5d1e88c5afcb96560713b1206aaa4c4ab98d7c (diff)
Generate default constructors for classes used in static const members
-rw-r--r--odb/relational/common.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/odb/relational/common.cxx b/odb/relational/common.cxx
index 914a778..469eef1 100644
--- a/odb/relational/common.cxx
+++ b/odb/relational/common.cxx
@@ -316,8 +316,8 @@ namespace relational
os << ": " << name << "_base_";
os << "{"
- << name << suffix << " (){}"; // For some reason GCC needs this c-tor
- // if we make the static member const.
+ << name << suffix << " (){}"; // Need user-defined default c-tor
+ // for initialization of const.
object_columns_base::traverse_composite (m, c);
@@ -472,6 +472,8 @@ namespace relational
os << "struct " << name << "_type_: " <<
name << "_pointer_type_, " << name << "_column_type_"
<< "{"
+ << name << "_type_ (){}" // Need user-defined default c-tor
+ // for initialization of const.
<< "};";
os << "static const " << name << "_type_ " << name << ";"
@@ -513,7 +515,9 @@ namespace relational
os << "struct " << name << "_type_: " <<
name << "_pointer_type_, " << name << "_column_type_"
- << "{";
+ << "{"
+ << name << "_type_ (){}"; // Need user-defined default c-tor
+ // for initialization of const.
column_ctor (name + "_type_", name + "_column_type_");