[fpc-pascal] how to convert this to mode objfpc

misu kun misu.dev at gmail.com
Mon May 11 16:48:42 CEST 2015


thanks
in objfpc mode i can imagine this ,but it didn't work unless i specialize (obj)


type
     generic obj<T> = object
		x : T;
     end; 		
operator + (arg1 ,arg2 : obj):obj; // error : here (obj) needs specialization
begin
	result.x := arg1.x + arg2.x;
end;



More information about the fpc-pascal mailing list