2009/11/10 Denis Koroskin <2kor...@gmail.com>: > On Tue, 10 Nov 2009 03:27:20 +0300, Bill Baxter <wbax...@gmail.com> wrote: > > kprintf (a printf variant) in XoMB is a nice example imo. It accepts format > as a template parameter, doing all the checks at compile-time (and more). > > http://github.com/xomboverlord/xomb-bare-bones/blob/6d924a9fd7cafe43aa50f38c0cd04c44187d4993/kernel/core/kprintf.d >
Nice. 400 lines is a little long for this purpose, though. Maybe a somewhat simplified version that just replaces {} with template args would be good. I guess that's pretty much what std.metastrings.Format does, just with %s instead of {}. --bb