Mercurial > ~dholland > hg > ag > index.cgi
comparison anagram/agcore/tree.cpp @ 6:607e3be6bad8
Adjust to the moving target called the C++ standard.
Apparently nowadays it's not allowed to define an explicit copy
constructor but not an assignment operator. Consequently, defining the
explicit copy constructor in terms of the implicit/automatic
assignment operator for general convenience no longer works.
Add assignment operators.
Caution: not tested with the IBM compiler, but there's no particular
reason it shouldn't work.
author | David A. Holland |
---|---|
date | Mon, 30 May 2022 23:46:22 -0400 (2022-05-31) |
parents | 13d2b8934445 |
children |
comparison
equal
deleted
inserted
replaced
5:7661c1604e49 | 6:607e3be6bad8 |
---|---|
34 {} | 34 {} |
35 | 35 |
36 ParseTree::ParseTree(const ParseTree &t) | 36 ParseTree::ParseTree(const ParseTree &t) |
37 : KeyedObjectRegister<parse_tree_map>(t) | 37 : KeyedObjectRegister<parse_tree_map>(t) |
38 {} | 38 {} |
39 | |
40 void ParseTree::operator = (const ParseTree &t) { | |
41 KeyedObjectRegister<parse_tree_map>::operator = (t); | |
42 } | |
39 | 43 |
40 ParseTree::ParseTree(CharSetExpression *x) | 44 ParseTree::ParseTree(CharSetExpression *x) |
41 : KeyedObjectRegister<parse_tree_map>(parse_tree_map(x)) | 45 : KeyedObjectRegister<parse_tree_map>(parse_tree_map(x)) |
42 { | 46 { |
43 LOGSECTION("ParseTree::ParseTree"); | 47 LOGSECTION("ParseTree::ParseTree"); |