import std.container;
        import std.format;
        Array!char str;
        str.length = 256;

        str.sformat!"%s:%s"("some", "string");
// Error: template std.format.sformat cannot deduce function from argument types !("%s:%s")(Array!char, string, string), candidates are: // std.format.sformat(alias fmt, Args...)(char[] buf, Args args) if (isSomeString!(typeof(fmt))) // std.format.sformat(Char, Args...)(char[] buf, in Char[] fmt, Args args)

        auto rng = cast(char[]) str[];
// Error: cannot cast expression `str.opSlice()` of type `RangeT!(Array!char)` to `char[]`


Additionally, would sformat cause GC allocations even when writing to a preallocated buffer?

Reply via email to