Logo Search packages:      
Sourcecode: ragel version File versions

template<class T, class Resize = ResizeExpn>
SVector< T, Resize >::replace ( long  pos,
const T &  val 
) [inline]

Replace one element at position pos.

If there is an existing element at position pos (if pos is less than the length of the vector) then its destructor is called before the space is used. The copy constructor is used to place the element into the vector. If pos is greater than the length of the vector then undefined behaviour results. If pos is negative then it is treated as an offset relative to the length of the vector.

Definition at line 115 of file svectcommon.h.

{ replace(pos, &val, 1); }

Generated by  Doxygen 1.6.0   Back to index