This is a workaround for the STL swap function. It has some surprising behaviour, so I wrote my own.
Attach a file by drag & drop or click to upload