What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from 2012-10-19 02:36:28 PDT ---
(In reply to comment #1)
> I expect that this stems from the stupidity of character literals defaulting 
> to
> char rather than dchar, and when you couple that with the fact that templates
> always use the _exact_ type of what you give them, it's going to try and
> instantiate join with a separator of char, which doesn't work with ranges of
> dchar. I'm not sure how you'd go about fixing that.

I investigated, and that's not it.

It's *just* that std.array.join, like std.algorithm.joiner, expects the
separator to be a range.

The enhancement request here would be for both "std.array.join"
std.algorithm.joiner" to accept a single element as a separator.

In the meantime, of course, a simple workaround is to just "join([sep])".

I think this needlessly allocates a 1 element array though, no?

On a side note, the current restrictions in join are overly restrictive,
requiring an exact match, making this illegal:

   int[] sep = [1];
   double[] z = [[0.1], [0.2]].join(sep);

When it is perfectly supported: joiner supports it.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to