String manipulation with std::adjacent_find
First impressions: nicely presented code; good use of the appropriate standard library functions and classes.

A minor suggestion would be to change the name, given that reduce is a well-known concept in functional programming (and is a function in &lt;numeric&gt;).  Perhaps call it compress?

I'd suggest extracting the constant 3 to give it a meaningful name.

Can we eliminate the break with some reorganisation of the loop?  Perhaps by using std::mismatch(it, it+1) instead of std::adjacent_find()?  (I haven't fully thought that through; it might not be better.)

We can avoid constructing a new string here:


        result += std::string(dist, *it);



by using the overload of append() that takes two iterators:

        result.append(dist, *it);