33 template<
class T,
int SizeMin>
36 const labelRange& slice
44 else if (slice.after() >= this->size())
47 this->
resize(slice.first());
52 label j = slice.first();
53 const label len = this->size();
55 for (label i = slice.after(); i < len; ++i, ++j)
57 Foam::Swap(this->
operator[](i), this->
operator[](j));
60 resize(this->size() - slice.size());
67 template<
class T,
int SizeMin>
70 const labelRange& slice
73 if (slice.first() > 0)
76 label j = slice.first();
77 const label len = slice.size();
79 for (label i = 0; i < len; ++i, ++j)
81 Foam::Swap(this->
operator[](i), this->
operator[](j));