I want to extract integers from a range (range of characters). Consider:
char buff[] = "12345 67890"; auto a = make_from_bounded_range
(buff, buff + 5); auto b = make_from_counted_range (buff, 5); auto c = make_from_bounded_range (buff + 6, buff + 6 + 5); auto d = make_from_counted_range (buff + 6, 5); cout << a << '\n' << b << '\n' << c << '\n' << d << '\n'; Prints: 12345 12345 67890 67890
How can I do this today with Boost multiprecision? I don't want to copy characters to a temporal buffer.
I would say this is a string-stream problem - what you want to do is create a stream which doesn't copy the data - there's an example here: https://github.com/boostorg/regex/blob/develop/include/boost/regex/v4/cpp_re... which you could cut and paste to do the job? John.