justinmeiners / efficient-programming-with-components

Course notes for Alexander Stepanov's teachings on design and usage of C++ STL.
https://www.jmeiners.com/efficient-programming-with-components/
74 stars 6 forks source link

add example of how to use list pool #40

Closed justinmeiners closed 2 years ago

justinmeiners commented 2 years ago

This partially addresses #39.

aharrison24 commented 2 years ago

That's really good, thanks.

I find it frustrating that the allocate member function doesn't compose as well as cons does in lisp. I couldn't help myself but try and fix that (in a verbose C++98 style to maintain Stepanovianism!) https://godbolt.org/z/Efj5G8bdK

Perhaps you could set that as an exercise! 😂 (not serious!)