title: parallel loop over pairs
body: <p>What is the best way in C++11 to perform a pairwise computation in multiple threads? What I mean is, I have a <code>vector</code> of elements, and I want to compute a function for each pair of distinct elements. The caveat is that I cannot use the same element in multiple threads at the same time, e.g. the elements have states that evolve during the computation, and the computation relies on that.</p>