[Issue 14845] [REG 2.068] some rangified Char[] functions no longer take a static array

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Aug 3 13:49:15 PDT 2015


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

--- Comment #7 from Martin Nowak <code at dawg.eu> ---
Mmh, even the static array overload doesn't work.

For whatever reason/bug the ref to a static array gets matched when being
called with a string literal.

/// Ditto
deprecated("Please slice the static array before calling chomp.")
auto chomp(C1, size_t n)(ref C1[n] str)
    if (isSomeChar!C1)
{
    C1[] slice = str[];
    return chomp(slice);
}

--


More information about the Digitalmars-d-bugs mailing list