Hi, Am 24.01.2017 14:00, schrieb Richard Hodges:
It's almost looking like conversion to utf8, wide strings, strings or string_views should be a filter rather than an option.
A filter always needs an input encoding and an output encoding. If we want to have filters to chose the output encoding between UTF-8, Latin 1, etc. what is going to be the input encoding?
Note that I am still resisting the idea of .str() as a member function. If the joiner or concatenation object exports begin() and end(), it's un-necessary, because the object returned by create_string() (or similar) can use the iterators.
I like that idea, though I still don't like the name to_string().
How about this:
auto s = generatestd::sting(concat(...));
auto ws = generatestd::wsting(concat(...));
generatestd::sting(s, concat(...)); // returns reference to s for
consistency
auto v = generate
Having iterators also means that the attributed factory can be used as a source in std::copy, std::transform, std::for_each etc.
.. and in range expressions :-) Christof