revdoor is a single-file C++ library for visiting revolving door combinations.
The combinations without replacement generator implements Algorithm R from TAOCP 184.108.40.206 . 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: