comparison oldclasslib/source/charsink.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
60 copy_flag = 0; // this is live 60 copy_flag = 0; // this is live
61 } 61 }
62 62
63 63
64 // Copy constructor 64 // Copy constructor
65
66 void string_accumulator::operator = (const string_accumulator &s) {
67 cs = s.cs;
68 xs = s.xs;
69 csx = s.csx;
70 xsx = s.xsx;
71 csmax = s.csmax;
72 xsmax = s.xsmax;
73 copy_flag = s.copy_flag;
74 }
65 75
66 string_accumulator::string_accumulator(const string_accumulator &s) 76 string_accumulator::string_accumulator(const string_accumulator &s)
67 : character_sink() 77 : character_sink()
68 { 78 {
69 *this = s; 79 *this = s;