Why is std.string.format a c-style variadic function?
Steven Schveighoffer
schveiguy at yahoo.com
Mon Sep 26 08:12:53 PDT 2011
On Mon, 26 Sep 2011 08:42:09 -0400, Andrej Mitrovic
<andrej.mitrovich at gmail.com> wrote:
> On 9/26/11, Jacob Carlborg <doob at me.com> wrote:
>> std.string.format is using a D-style variadic parameter list.
>
> The compiler disagrees with you:
>
> D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\string.d(2432): Error:
> function std.string.format C-style variadic functions are not yet
> implemented in CTFE
>
> L2432:
> string format(...)
>
> I don't see any other format() overloads in std.string.
That's likely a bug. D variadic functions push the TypeInfo of each
parameter onto the stack as well as the parameters themselves.
Unfortunately, it's probably just a wrong error message, I doubt D
variadic parameters are supported in CTFE.
-Steve
More information about the Digitalmars-d-learn
mailing list