On 26 May 2014 11:47, Vladimir Batov
Vladimir Batov wrote
Jeroen Habraken wrote
I may have time at the end of the week, but no promises unfortunately. OK, the old man has to do it all by himself. :-) How do I download the latest/greatest of "coerce" without copying individual files from the sandbox?
Or I'll just run raw Spirit.Qi example from http://www.kumobius.com/2013/08/c-string-to-int/
#include <string> #include
#include bool String2Int(const std::string& str, int& result) { std::string::const_iterator i = str.begin(); if (!boost::spirit::qi::parse(i, str.end(), boost::spirit::int_, result)) return false; return i == str.end(); // ensure the whole string was parsed }
That's a nice solution, and should save quite a bit of headache. Jeroen