From 28c27243c8b5bd176faa827224746491d51ebb66 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 6 Jun 2015 00:11:12 +0200 Subject: [PATCH] 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! --- src/lib/diff/record.hpp | 2 +- tests/library/diff/generic-record-representation-test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/diff/record.hpp b/src/lib/diff/record.hpp index ac217c7e3..20ff4790a 100644 --- a/src/lib/diff/record.hpp +++ b/src/lib/diff/record.hpp @@ -186,7 +186,7 @@ namespace diff{ /* ==== Exposing scope and contents for iteration ====== */ using iterator = IterAdapter; - using scopeIter = typename iter_stl::_SeqT<_Vec>::Range; + using scopeIter = typename iter_stl::_SeqT::Range; using keyIter = TransformIter; using valIter = TransformIter; diff --git a/tests/library/diff/generic-record-representation-test.cpp b/tests/library/diff/generic-record-representation-test.cpp index e4ad79e17..549bd8ed6 100644 --- a/tests/library/diff/generic-record-representation-test.cpp +++ b/tests/library/diff/generic-record-representation-test.cpp @@ -190,7 +190,7 @@ namespace test{ CHECK (!isSameObject (a.get("a"), b.get("a"))); CHECK (!isSameObject (*a.scope(), *b.scope())); - string& c = *b.scope(); + string const& c = *b.scope(); CHECK ("c" == c); RecS bb;