[Cs3] decorator with references

Mikhail Nesterenko mikhail at cs.kent.edu
Tue Nov 21 15:41:31 EST 2017


CS3 students,

Regarding the issues with references-based decorator that did not
properly accept the objects of the same class. This caused issues when
sprinkles had to be added to sprinkles in the Coffee Shack lab.

The problem was hard to spot. I ended up asking on stackoverflow. It
turns out to be an issue with default copy constructor being invoked
instead of the provided constructor. See this question and discussion
for more details.

   https://stackoverflow.com/questions/47420473/overloaded-functions-skipped-on-references/47422123#47422123

I fixed the example code on the course's webpage as well.

Thanks,
-- 
Mikhail


More information about the cs3 mailing list