See https://svn.boost.org/trac/boost/ticket/4840 for patch and possibly more information. I would really appreciate backporting of this particular patch to 1.46.1 and 1.47.0 when it comes around. Given the fact that there is no actual *porting* involved it is as simple as getting the patch, adding it to ebuild and pushing -r1 into tree. Thanks a bunch in advance. I also attach svn-extracted patch fixing this issue.
Created attachment 283505 [details, diff] xml_write.patch
I asked on the upstream bug why the fix hasn't been released. Let's see what they have to say.