In fact, everything is not as good as you say.
...In order to use it (FPC 3.3.1 and higher and Lazarus 1.9.0 and higher)...
If installing the appropriate version of the compiler is a serious problem for you, I might think about how to do without LGenerics.
Ok, basically we only need sorting and binary search algorithms.A fairly good sorting algorithm is available in fcl-stl. But I had to write BinarySearch from scratch,I hope that it will work correctly. Let me know if anything goes wrong.
AVK, I'm sorry but I still have problem with starting sort_count.lpk. He refers to LGeneric, and he can't find RTTI. I even installed the latest version of Lazarus 2.0.6 FPC 3.0.4. for windows 10/64.Thank you anyway.
@mpknap, please test this version.