Ada 中通用容器的算法

Algorithms for generic containers in Ada

是否有实现通用容器通用算法的 Ada 库,如 Delete_IfCount_If 等?对于了解 C++ 的人,我正在寻找类似于 C++ STL 的东西。

虽然 "Questions asking us to recommend or find a…software library…are off-topic," Ada.Containers,详情见 §18 of the Ada Reference Manual, will likely provide the best equivalent to elements of the Standard Template Library. Each container type uses an instance of Ada.Iterator_Interfaces to Iterate through the container, invoking whatever predicate (find, count, etc.) is defined in your implementation of Process. See §A.18.32 Example of Container Use and §8.3 Iterating and updating containers

虽然它几乎肯定已被 Ada-2005/2012 中的 Ada.Containers 取代,但在 Stepanov 将其转换为 C++ 之前,您可能对 STL 的 Ada 前身感兴趣。

这是今天在 comp.lang.ada 上发布的。

如果你去 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.

因为它似乎适用于 VAX/VMS Ada 编译器并且可以追溯到 1989 年,它可能仅具有历史意义,甚至使用 Gnat 构建它可能需要一些努力,更不用说了将其用于您的目的。