Search code examples
stladastl-algorithm

Algorithms for generic containers in Ada


Is there an Ada library that implements common algorithms for generic containers, like Delete_If, Count_If, etc.? For those who know C++, I am looking for something akin to the C++ STL.


Solution

  • While it's almost certainly been superseded by Ada.Containers in Ada-2005/2012, you may be interested in an Ada precursor of the STL, before Stepanov converted it to C++.

    This was posted today on comp.lang.ada.

    If you go to Alex Stepanov's papers and scroll down to the "Source Code" section, the third link there is to "David R. Musser and Alexander A. Stepanov: Ada Generic Library" as a zip file, unpacked, and a readme.

    As it appears to be for a VAX/VMS Ada compiler and dates from 1989, it may be of historical interest only, and there may be some effort required in even getting it to build using Gnat, let alone using it for your purposes.