Section C.3.2

LRM-297

Changes:

class List#(parameter type T);

extern function new();

extern function int size();

extern function int empty();

extern function void push_front( T value );

extern function void push_back( T value );

extern function T front();

extern function T back();

extern function void pop_front();

extern function void pop_back();

extern function List_Iterator#(T) start();

extern function List_Iterator#(T) finish();

extern function void insert( List_Iterator#(T) position, T value );

extern function void insert_range( List_Iterator#(T) position, first, last );

extern function void erase( List_Iterator#(T) position );

extern function void erase_range( List_Iterator#(T) first, last );

extern function void assign set( List_Iterator#(T) first, last );

extern function void swap( List#(T) lst );

extern function void clear();

extern function void purge();

endclass

Section C.5.15

LRM-297

Changes:

C.5.15 assignset()

 

function void assignset( List_Iterator#(T) first, last );

 

assign set assigns to the list object the elements that lie in the range specified by the first and last iterators. After this method returns, the modified list will have a size equal to the range specified by first and last. This method copies the data from the first iterator’s position up to, but not including, the last iterator’s position. If the last iterator refers to an element before the first iterator, the range wraps around the end of the list.

 

list2.assignset( list1.start, list2.finish ); // list2 is a copy of list1

 

If the range iterators are invalid (i.e., they refer to different lists or to invalid positions), then this operation is illegal and can generate an error.

Remove editor’s note:

Editor’s Note: “assign” is a Verilog keyword. Is it a legal function name in this context?