On 25/02/2015 05:10, ashish g wrote:
I have a property tree which has strings of char16_t as both key and value datatypes.
When I try to call read_xml() to load an xml file into this tree it fails. The same code however works with wchar_t.
Seems like its failing on parse_bom() function.
The code and error message can be seen here: http://coliru.stacked-crooked.com/a/3f922b43838fd7e8
The error message is fairly obvious: parse_bom is only defined for char and wchar_t, not any other type. (Looking at the implementation, I'm not convinced that it's correct for 32-bit wchar_t either, but that's a different issue, and could just be because I'm looking at an older version of Boost.)
Any tips on how to fix this issue.
Either file a bug report / feature request to get support added for this, or use one of the supported character types instead. Don't forget to read the docs as well. They suggest that there are known deficiencies and gotchas in the XML parsing/writing.