WIP: const correctnes: Record is conceived as immutable
...and so should be all the exposed iterators. Thanks, dear C++ compiler for spotting this subtle mismatch!
This commit is contained in:
parent
96e10faa84
commit
28c27243c8
2 changed files with 2 additions and 2 deletions
|
|
@ -186,7 +186,7 @@ namespace diff{
|
||||||
/* ==== Exposing scope and contents for iteration ====== */
|
/* ==== Exposing scope and contents for iteration ====== */
|
||||||
|
|
||||||
using iterator = IterAdapter<typename _Vec::const_iterator, const Record*>;
|
using iterator = IterAdapter<typename _Vec::const_iterator, const Record*>;
|
||||||
using scopeIter = typename iter_stl::_SeqT<_Vec>::Range;
|
using scopeIter = typename iter_stl::_SeqT<const _Vec>::Range;
|
||||||
using keyIter = TransformIter<scopeIter, string>;
|
using keyIter = TransformIter<scopeIter, string>;
|
||||||
using valIter = TransformIter<scopeIter, VAL>;
|
using valIter = TransformIter<scopeIter, VAL>;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ namespace test{
|
||||||
CHECK (!isSameObject (a.get("a"), b.get("a")));
|
CHECK (!isSameObject (a.get("a"), b.get("a")));
|
||||||
CHECK (!isSameObject (*a.scope(), *b.scope()));
|
CHECK (!isSameObject (*a.scope(), *b.scope()));
|
||||||
|
|
||||||
string& c = *b.scope();
|
string const& c = *b.scope();
|
||||||
CHECK ("c" == c);
|
CHECK ("c" == c);
|
||||||
|
|
||||||
RecS bb;
|
RecS bb;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue