Florian Reiser - 2017-11-16

I've found a bug in RapidXml-1.13, file rapidxml_print.hpp:403.
The line
print(std::ostream_iterator<Ch>(out), node, flags);
causes compiler errors, if you compile it with Unicode support on VS2015. If you change it to
print(std::ostream_iterator<Ch, Ch>(out), node, flags);
anything is fine.

Patch:

--- rapidxml_print.hpp  2017-11-16 11:48:45.568522300 +0100
+++ rapidxml_print_patch.hpp    2017-11-16 11:39:44.170322300 +0100
@@ -400,7 +400,7 @@
     template<class Ch> 
     inline std::basic_ostream<Ch> &print(std::basic_ostream<Ch> &out, const xml_node<Ch> &node, int flags = 0)
     {
-        print(std::ostream_iterator<Ch>(out), node, flags);
+        print(std::ostream_iterator<Ch, Ch>(out), node, flags);
         return out;
     }