[Issue 16263] Error: template std.algorithm.iteration.permutations cannot deduce function from argument types !()(char[])

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 10 10:33:25 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16263

Andrew Godfrey <ag.dlang at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag.dlang at gmail.com

--- Comment #2 from Andrew Godfrey <ag.dlang at gmail.com> ---
(In reply to Ketmar Dark from comment #1)
> it is autodecoding again: std.utf.byChar will do the trick. note that it
> works perfectly with array of dchars, as those need not to be decoded.

That will not work "perfectly" in all languages. I don't speak a language where
it doesn't work, so can't give a good example. But it doesn't make sense to
permute dchars that don't represent whole 'characters'.

Anyway, I'm just cautioning against this apparent workaround.
If you need to permute characters, it sounds like you can use dchars, but you
should additionally restrict yourself to dchar values that represent whole
characters. (Or to languages where that's true for all the characters you'll
use).

--


More information about the Digitalmars-d-bugs mailing list