Mercurial > ~dholland > hg > ag > index.cgi
comparison anagram/agcore/rule.h @ 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 |
parents | 13d2b8934445 |
children |
comparison
equal
deleted
inserted
replaced
5:7661c1604e49 | 6:607e3be6bad8 |
---|---|
22 class Rule : public ObjectRegister<RuleDescriptor> { | 22 class Rule : public ObjectRegister<RuleDescriptor> { |
23 public: | 23 public: |
24 Rule();// {} | 24 Rule();// {} |
25 Rule(int x); | 25 Rule(int x); |
26 Rule(const Rule &t); | 26 Rule(const Rule &t); |
27 void operator = (const Rule &); | |
27 Token &token(int) const; | 28 Token &token(int) const; |
28 | 29 |
29 static Rule create(); | 30 static Rule create(); |
30 static void reset(); | 31 static void reset(); |
31 static const int first; | 32 static const int first; |