I
was considering using a ring type at first but I was having a
wrong result too.
I
was using the append function and then the correct
one.
Maybe
I was missing something to "close" the polygon?
correct() should reverse and close the Ring for you if needed so it
probably wasn't it.
What was wrong with the result?
Have in mind that for Points contained inside a Ring the distance is
0.
You could debug your code and see if the data stored in your objects
is correct before passing it into an algorithm.
In order to debug Boost.Geometry conveniently you could use
debugging visualizers/helpers: