summaryrefslogtreecommitdiff
path: root/xsd/xsd/cxx/tree/tree-header.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/xsd/cxx/tree/tree-header.cxx')
-rw-r--r--xsd/xsd/cxx/tree/tree-header.cxx38
1 files changed, 38 insertions, 0 deletions
diff --git a/xsd/xsd/cxx/tree/tree-header.cxx b/xsd/xsd/cxx/tree/tree-header.cxx
index ffec3a3..6987d5e 100644
--- a/xsd/xsd/cxx/tree/tree-header.cxx
+++ b/xsd/xsd/cxx/tree/tree-header.cxx
@@ -252,6 +252,12 @@ namespace CXX
<< container << "* c = 0);"
<< endl;
+ os << "#ifdef XSD_CXX11" << endl
+ << name << "&" << endl
+ << "operator= (const " << name << "&) = default;"
+ << "#endif" << endl
+ << endl;
+
// clone
//
if (doxygen)
@@ -527,6 +533,12 @@ namespace CXX
<< container << "* c = 0);"
<< endl;
+ os << "#ifdef XSD_CXX11" << endl
+ << name << "&" << endl
+ << "operator= (const " << name << "&) = default;"
+ << "#endif" << endl
+ << endl;
+
// clone
//
if (doxygen)
@@ -942,6 +954,12 @@ namespace CXX
<< container << "* c = 0);"
<< endl;
+ os << "#ifdef XSD_CXX11" << endl
+ << name << "&" << endl
+ << "operator= (const " << name << "&) = default;"
+ << "#endif" << endl
+ << endl;
+
// clone
//
if (doxygen)
@@ -3319,11 +3337,14 @@ namespace CXX
// operator=
//
bool priv (false);
+ bool asop (true);
if (!simple)
{
if (options.suppress_assignment ())
{
+ asop = false;
+
priv = true;
os << "private:" << endl;
@@ -3343,6 +3364,8 @@ namespace CXX
}
else if (has_members || (gen_wildcard && (hae || haa)))
{
+ asop = false;
+
if (doxygen)
{
os << "/**" << endl
@@ -3371,6 +3394,15 @@ namespace CXX
if (priv)
os << "public:" << endl;
+ if (asop)
+ {
+ os << "#ifdef XSD_CXX11" << endl
+ << name << "&" << endl
+ << "operator= (const " << name << "&) = default;"
+ << "#endif" << endl
+ << endl;
+ }
+
// d-tor
//
if (doxygen)
@@ -3872,6 +3904,12 @@ namespace CXX
flags_type << " f = 0);"
<< endl;
+ os << "#ifdef XSD_CXX11" << endl
+ << name << "&" << endl
+ << "operator= (const " << name << "&) = default;"
+ << "#endif" << endl
+ << endl;
+
// _clone
//
if (doxygen)