void test2() { DynArray<int> a; a.extend_default(3); show(a); a.extend_fill(3,1); show(a); const int buf[3]= {2,3,4}; a.extend_copy(3,buf); show(a); int sbuf[3]= {5,6,7}; a.extend_swap(3,sbuf); show(a); a.extend(3,SqList(7)); show(a); a.extend(OddList(10,10)); show(a); }
BuilderSlot & take(ulen slot_id) { ulen len=bslots.getLen(); if( slot_id>=len ) { bslots.extend_default(LenAdd(slot_id-len,1)); } return bslots[slot_id]; }