ENH: return UList range slice as a SubList

- previously returned the range slice as a UList,
  but this prevents convenient assignment.
  Apply similar handling for Field/SubField

  Allows the following

     labelRange range(...);
     fullList.slice(range) = identity(range.size());

  and

     fullList.slice(range) = UIndirectList<T>(other, addr);

ENH: create SubList from full FixedList (simplifies interface)

- allow default constructed SubList. Use shallowCopy to 'reset' later
This commit is contained in:
Mark Olesen
2021-10-21 17:35:03 +02:00
parent 3781f17eee
commit e2861cc200
14 changed files with 269 additions and 96 deletions

View File

@ -49,7 +49,7 @@ void printInfo(const SortableList<T>& list)
int main(int argc, char *argv[])
{
const labelList orig{7, 9, 1, 2, 4, 7, 4, 0};
const labelList orig({7, 9, 1, 2, 4, 7, 4, 0});
labelList order;