std.metastrings and Variadic CTFE funcs
Daniel Keep
daniel.keep.lists at gmail.com
Fri Nov 6 05:58:11 PST 2009
Bill Baxter wrote:
> To Don, Walter, or anyone else who knows:
> How hard is it going to be to get variadic CTFE functions working?
> Or how hard would it be to get
>
> std.metastrings.Format should be a major workhorse of CTFE string
> functions, but it can't be because it's all done using template args.
> And I'm assuming it's a template because variadic CTFE funcs don't work.
I just wrote my own.
http://github.com/DanielKeep/gb/blob/master/src/gb/ctfe/Format.d
Takes metastrings.Format out back and beats it black and blue before
putting a silly hat on its head and dropping a cream pie down the front
of its trousers.
> In general, it would be nice to have more std.string functions
> available (as CTFE-capable functions) in std.metastrings. Like
> Replace and IndexOf. I whipped up a quick version of those two based
> somewhat on std.strings' versions just now.
Again, I just add stuff as I need it.
http://github.com/DanielKeep/gb/blob/master/src/gb/ctfe/String.d
I remember Walter talking about how CTFE meant you wouldn't need
distinct runtime and compile-time libraries.
Oh, how I chuckle.
-- Daniel
More information about the Digitalmars-d
mailing list