Hi, Am 26.01.2017 10:41, schrieb Hans Dembinski:
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(...));
Why don't you add explicit conversion operators to the string factory
explicit operator std::string() { … } explicit operator std::wstring() { … }
explicit type conversion was exactly added for this situation in C++11. The call is then
auto s = static_caststd::string(concat(…));
That is the worst we had up to now. Even an implicit conversion is better, which is not at all my favourite as well. Christof