ENH: minor de-clutter of List, DynamicList, DynamicField (#2385)

- do not need contruct or move assign from SortableList.
  Rarely (never) used and can simply treat like a normal list
  by applying shrink beforehand.

- make append() methods return void instead of returning self, which
  makes it easier to derive from. Having them return self was a bit of
  an original design mistake.
  Chaining appends do not actually occur anywhere. Even if they were
  to be used, would not want to rely on them (fear of slicing on any
  derived classes).

BUG: IndirectList iterator comparison loses constness
This commit is contained in:
Mark Olesen
2022-03-07 10:46:25 +01:00
parent 47cd988296
commit 42fe95a6a9
11 changed files with 91 additions and 226 deletions

View File

@ -106,6 +106,18 @@ int main(int argc, char *argv[])
testFind(val, idl1);
}
{
auto iter = idl1.cbegin();
const auto endIter = idl1.cend();
while (iter != endIter)
{
// No post-fix increment:
Info<< *iter << nl;
++iter;
}
}
inplaceReverseList(addresses);
idl1.addressing() = std::move(addresses);