On 14-10-01 05:00 AM, Paul A. Bristow wrote:
You may well be right, but I'm only reporting what I found were my 'needs'.
You can show how to wrap write_all output (with 'smart' delimiter - no ugly trailing commas!) with prefix and suffix strings, that will probably be fine. Yeah, sure - actually write_all() does that right out of the box:
o << "prefix" << write_all({1,2,3}, "delimiter") << "suffix"; // Prints: "prefix1delimiter2delimiter3suffix"; So: o << '{' << write_all({1,2,3}, ',') << '}'; // Prints: "{1,2,3}"
I only meant a string in C++ syntax like
int[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
that you have shown is possible. Actually, you can probably generalize that. The following code isn't tested, but:
template
Now you need some enthusiastic users to support you on a review ;-) Yeah? I'm not sure how the process goes here. Do I make a pull request on the Boost.Range repository and implement the changes? Or do I implement the idea separately, so people can experiment and mess around with it, and only after it's passed review try to integrate it with the rest of the library? Do I get in touch with the Boost.Range maintainers (seems to be Thorsten Ottosen and Neil Groves)?