On Wednesday, 30 December 2015 at 15:30:05 UTC, Adam D. Ruppe
wrote:
On Wednesday, 30 December 2015 at 14:25:24 UTC, default0 wrote:
Checking dpldocs for proper formatting and spending half a
minute making sense of it I figured that the one was for an
exactly matched element type and the other one was to allow
joining a baseClass[][] with a subClass[] or something along
those lines.
The join overloads are basically:
#1: array of arrays joined by an array
join(["a", "b", "c"], ", "); // the joiner is an array
-> "a, b, c"
#2: array of arrays joined by an element
join(["a", "b", "c"], ' '); // the joiner is an element
-> "a b c"
There is no example for form #2 in the documentation. (BTW I
think the examples should be commented too.)
#3: array of arrays joined without anything
join(["a", "b", "c"])
-> "abc"
Yeah, I misinterpreted the "E : <stuff>" to mean "E is or
inherits from <stuff>", rechecking the argument deduction rules
for templates I think this instead means "E should be deduced as
<stuff>".