comparison anagram/agcore/rpz.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
parents 13d2b8934445
children
comparison
equal deleted inserted replaced
5:7661c1604e49 6:607e3be6bad8
317 LOGV(tn) LCV(ntkns); 317 LOGV(tn) LCV(ntkns);
318 if (tn.isNotNull()) { 318 if (tn.isNotNull()) {
319 sis(tn); 319 sis(tn);
320 return; 320 return;
321 } 321 }
322 tn = n->token_number = Token::create(); 322 n->token_number = Token::create();
323 tn = n->token_number;
323 tn->token_name = n; 324 tn->token_name = n;
324 tn->value_type = 0; 325 tn->value_type = 0;
325 if (!flag && n->parse_tree.isNotNull()) { 326 if (!flag && n->parse_tree.isNotNull()) {
326 n->parse_tree = ParseTree(); 327 n->parse_tree = ParseTree();
327 warning_here("Redefinition of %s", n->string.pointer()); 328 warning_here("Redefinition of %s", n->string.pointer());
354 Keyword keyword(string_base); 355 Keyword keyword(string_base);
355 LOGV(keyword->string); 356 LOGV(keyword->string);
356 rcs(); 357 rcs();
357 LOGV((int) keyword->token_number); 358 LOGV((int) keyword->token_number);
358 if (keyword->token_number.isNull()) { 359 if (keyword->token_number.isNull()) {
359 Token token = keyword->token_number = Token::create(); 360 keyword->token_number = Token::create();
361 Token token = keyword->token_number;
360 LOGV((int) token); 362 LOGV((int) token);
361 token->key = keyword; 363 token->key = keyword;
362 token->value_type = void_token_type; 364 token->value_type = void_token_type;
363 token->operatorCandidate = 1; 365 token->operatorCandidate = 1;
364 } 366 }