Meta / CTFE library

Matthias Walter Matthias.Walter at st.ovgu.de
Mon Jun 23 01:43:21 PDT 2008


Hello,

as I'm doing much stuff with CTFE / Template Metaprogramming, I thought about collecting important stuff in a library. I already found the following interesting:

1. parsing routines for compile-time; although every standard lib has their parsing routines, but sometimes they don't work at compile time (e.g. using some libc-stuff), or at least are not optimized for this use. This includes parsing / printing numbers as well, because at least for dumping some numbers, while debugging a CT-program, one needs these quiet often. Everyone, who read Dons BLADE library, will know his enquote() function. This one is very important if you like to do some recursive mixin programming, like he did there.

2. finding out attributes of types and identifiers (the latter means variables, functions, delegates, etc.). There are some attributes, which at least in D1, are nearly unaccessable. For example, one cannot tell (via a template / function), whether a function (given as a template alias) is static or not. I've coded a demangler, that can be used to extract all information, which is in the mangle. (as opposed to Walters and Dons demanglers which only print the names)

3. here comes the point of my post: I'd like to know your whishes, what should be in there, too! Has anyone found some special functions quiet useful for his own CT-projects, or desired some functionality, he could not implement?

Have you further suggestions about such a library, either in design or content?

best regards
Matthias Walter



More information about the Digitalmars-d mailing list