boost::multi_index_container is fast and powerful, but the documentation is dense and the compiler errors are worse. multi-index-examples is the cookbook I wish existed: small, runnable Qt/C++ snippets for the cases that actually come up — indexing a struct by name, phone, and address at once, composite keys for combined lookups, switching between ordered_* and hashed_* for O(log n) versus O(1) access, and the random_access index when you also want plain store[i] access.

The one that took longest to get right: modifying a field safely. Since every index has to stay in sync, you can’t just assign to a member — you go through project<>() to the index you want and call modify() with a small functor.