revdoor is a single-file C++ library for visiting revolving door combinations.
The combinations without replacement generator implements Algorithm R from TAOCP 18.104.22.168 . The combinations with replacement generator implements the same algorithm, modified to support replacement.
The algorithms visit combinations by indicating at most two pairs of items to swap in and out on each iteration.
The source code is available on GitHub: