1
Feature requests / Re: Tags
« on: 4 August 2014, 09:24:59 »
As someone more or less mentioned on stackoverflow: Change getTags() to return a reference, not a value/copy.
Not sure if that's all, but you don't want a (deep) copy there, for sure. The iterator gets out of bounds because you check against the end of a different set. Every call to getTags() gets its own copy.
Code: [Select]
const set<string> &getTags() const {return tags;}
Be aware that the return type is const, so use a const iterator.Not sure if that's all, but you don't want a (deep) copy there, for sure. The iterator gets out of bounds because you check against the end of a different set. Every call to getTags() gets its own copy.
