id summary reporter owner description type status milestone component version severity resolution keywords cc 8846 Improvements to Spirit Qi Qt QString custom_string.cpp example Mateusz Loskot Joel de Guzman "Tim Angus asked me to submit this patch (Boost Trac was complaining for him with ""Submission rejected as potential spam""). There is an example of how to use Qi with a custom string (in this case a QString from the Qt framework). This is very helpful but it doesn't work in conjunction with the debug facilities. The following patch fixes this by adding a couple of template specialisations. Patch: {{{ Index: libs/spirit/example/qi/custom_string.cpp =================================================================== --- libs/spirit/example/qi/custom_string.cpp (revision 85071) +++ libs/spirit/example/qi/custom_string.cpp (working copy) @@ -34,6 +34,26 @@ return true; } }; + + // Test if a QString is empty (required for debug) + template <> + struct is_empty_container + { + static bool call(QString const& c) + { + return c.isEmpty(); + } + }; + + // Define how to stream a QString (required for debug) + template + struct print_attribute_debug + { + static void call(Out& out, QString const& val) + { + out << val.toStdString(); + } + }; }}}" Patches closed To Be Determined spirit Boost Development Trunk Optimization fixed spirit qi qt qstring tim@…