On 11/19/2013 04:26 PM, Norbert Wenzel wrote:You are right. lexical_cast does work with string_ref.
I'm not sure if I understand your point correctly, but lexical_cast was
the one thing I used, which actually did work with string_ref. Though I
didn't check if lexical_cast made any copies or other unnecessary stuff
internally, but I think I got the correct results from lexical_cast.
I overlooked the fact that lexical_cast works with both pointer+size
and iterator_range ranges.
More specifically, I overlooked the fact that lexical_cast uses
string_ref::operator<< to obtain the data (and I guess that this is
why Boost.Spirit generally outperforms lexical_cast.)