diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-04-14 17:22:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-04-14 17:22:48 +0200 |
commit | ad02b4ec2d8b0044e03ae5f39e75564118d7ce70 (patch) | |
tree | a3d72e0df553a2efb197142cb9f3480f19b376d2 /xsd/cxx/tree/tree-header.cxx | |
parent | 7207d957dcc2425fc89bab11efd6c5941d630956 (diff) |
Do not suppress from-base c-tors for hierarchies with custom types
Diffstat (limited to 'xsd/cxx/tree/tree-header.cxx')
-rw-r--r-- | xsd/cxx/tree/tree-header.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
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<CLI::generate_default_ctor> ()) { - // 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<CLI::generate_from_base_ctor> ()) { - // 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); { |