From aacc631ed51b97eadfcbc8f4f8401171ef730a13 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 29 Apr 2012 15:26:48 +0200 Subject: Generate default constructors for classes used in static const members --- odb/relational/common.cxx | 10 +++++++--- 1 file 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_"); -- cgit v1.1