|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.learn - String pasting / symbol construction?
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
Jan 26 2007
Bill Baxter wrote:There's still no way to do that, right? Any good workarounds? Jan 27 2007
Reply to Bill, Jan 27 2007
|