On Tue, Dec 17, 2019 at 5:30 PM Gavin Lambert via Boost < boost@lists.boost.org> wrote:
On 16/12/2019 19:46, I wrote:
On 16/12/2019 17:46, Barrett Adair wrote:
STLInterfaces is a C++14 library targeting ISO standardization. The following templates are provided, all C++20-friendly:
1. iterator_interface - a modern version of the iterator_facade and iterator_adaptor parts of Boost.Iterator 2. view_interface - a pre-C++20 implementation of C++20's eponymous feature 3. container_interface - a tool to eliminate boilerplate when writing new containers
I'm probably not going to have time to do a proper review, however -- it's already Christmas season. [But I would like to see something like this in general to be accepted. We're still a long way from a C++20 world.]
After a bit more reading, a couple more points on the docs.
The iterator_interface tutorial specifies which members must be defined in the derived class, but I fail to see anywhere where it indicates which additional members will consequently be defined by the interface.
I don't think this is necessary for the iterators, because you need all the required user-provided operations for a given iterator category, and then you get an iterator of that category -- in other words, you get all the operations. The container docs differ because there are multiple sets of container requirements, and the mapping is not nearly so simple.
The container_interface tutorial does specify both, but it could probably do with some additional headings to separate the tables (to aid in finding the groups of operations that you're interested in), especially since most of the tables themselves have identical captions.
That's a good idea. I'll do that. Zach