String pasting / symbol construction?
Bill Baxter
dnewsgroup at billbaxter.com
Fri Jan 26 23:35:02 PST 2007
Just checking ... there's still no way to construct symbols (maybe
tokens is the right word?) at compile time is there?
For instance if I want to have something like
template funcs(char[] suffix) {
alias function1##suffix function1;
alias function2##suffix function2;
alias function3##suffix function3;
}
resulting in
funcs!("f").function1()
being equivalent to the call
function1f()
There's still no way to do that, right?
Any good workarounds?
(In this case I'd actually like to take 3 strings and paste em together
like that to make a function name).
--bb
More information about the Digitalmars-d-learn
mailing list