18 Jan
2017
18 Jan
'17
8:06 a.m.
On Mon, Jan 16, 2017 at 11:41 AM, Richard Hodges
Sorry to chime in so late in the discussion.
What about a syntax similar to this?
int main() { auto s = join("Hello ", ", World.", " The hex for ", 58, " is ", std::hex, 58); std::cout << s << std::endl;
s = join(separator(" : "), "a", "b", std::hex, 200 , std::quoted("banana")); std::cout << s << std::endl;
}
Which would produce the following output:
Hello , World. The hex for 58 is 3a a : b : c8 : “banana"
The syntax is fine but it's missing an appending variant, like append(s, "A", "B", 42); This variant is important as it (also) allows you to reuse existing storage.