From ad02b4ec2d8b0044e03ae5f39e75564118d7ce70 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Apr 2010 17:22:48 +0200 Subject: Do not suppress from-base c-tors for hierarchies with custom types --- xsd/cxx/tree/tree-header.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'xsd/cxx/tree/tree-header.cxx') diff --git a/xsd/cxx/tree/tree-header.cxx b/xsd/cxx/tree/tree-header.cxx index 100a81c..835a40f 100644 --- a/xsd/cxx/tree/tree-header.cxx +++ b/xsd/cxx/tree/tree-header.cxx @@ -2428,7 +2428,7 @@ namespace CXX // if (options.value ()) { - // c-tor (ultimate-base all-non-optional-members) will become + // c-tor (ultimate-base, all-non-optional-members) will become // default c-tor if our inheritance hierarchy has no required // members and no simple base. We can also collide with // c-tor (all-non-optional-members) if we have no required @@ -2462,9 +2462,13 @@ namespace CXX // if (options.value ()) { - // c-tor (ultimate-base, all-non-optional-members) will become - // c-tor (base, all-non-optional-members) unless our immediate - // base's hierarchy has some non-optional members. + // c-tor (base, all-non-optional-members) will be equivalent to + // c-tor (ultimate-base, all-non-optional-members) unless our + // immediate base's hierarchy has some non-optional members. + // We also need to generate this c-tor when one of the types + // in our inheritance hierarchy was customized since the + // customized version may not necessarily be convertible to + // the base without loss of information. // Boolean generate (false); { -- cgit v1.1