static void CheckVector( const vector_t& cv, size_t expected_size, size_t old_size ) { ASSERT( cv.capacity()>=expected_size, NULL ); ASSERT( cv.size()==expected_size, NULL ); ASSERT( cv.empty()==(expected_size==0), NULL ); for( int j=0; j<int(expected_size); ++j ) { if( cv[j].bar()!=~j ) REPORT("ERROR on line %d for old_size=%ld expected_size=%ld j=%d\n",__LINE__,long(old_size),long(expected_size),j); } }
// "capacity" refers to the size possible without (internal) re-allocation: size_type capacity() const { return stack.capacity(); }