If used on Windows, toml files often have \r\n at the end of a line. The parser handles this relatively well, however in skip_multiline_spacer it removes the \n at the end of a comment without checking for a \r before. This results in invalid toml files written to disk using std::ofstream on windows.
Proposed fix:
Change this line:
https://github.com/ToruNiina/toml11/blob/main/include/toml11/parser.hpp#L1858
To:
if(!comment.empty() && comment.back() == '\n')
{
comment.pop_back();
if (!comment.empty() && comment.back() == '\r')
comment.pop_back();
}