[fpc-pascal] FCL-STL's TVector<T> and removing of elements
Sven Barth
pascaldragon at googlemail.com
Sat Jan 28 19:30:51 CET 2012
Hello together!
Can it be that the TVector<T> type of FCL-STL has some problems when
deleting elements?
At least the following code generates an exception when running it:
program fclstltest1;
{$mode objfpc}
uses
gvector;
type
TMyVector = specialize TVector<LongInt>;
var
v: TMyVector;
begin
v := TMyVector.Create;
v.PushBack(42);
v.Erase(0);
v.Free;
end.
When using AnsiString or ShortString there the exception appears in
fpc_ansistr_assign and fpc_shortstr_to_shortstr respectively.
Am I doing something wrong here or is this indeed a bug?
Regards,
Sven
More information about the fpc-pascal
mailing list