digitalmars.D.learn - Function Templates in DLL
- Heinz (1/1) Apr 01 2008 I think it has been asked before....can a function template be exported ...
- BCS (7/8) Apr 01 2008 currently no.
- Robert Fraser (4/18) Apr 01 2008 Funny you mention that since that has been suggested and even worked out...
- BCS (8/33) Apr 02 2008 Almost, but not quite, I'm thinking more along the lines of thunk
I think it has been asked before....can a function template be exported in a dll?
Apr 01 2008
Heinz wrote:I think it has been asked before....can a function template be exported in a dll?currently no. theoretically.... If you were able to put a compiler in the DLL and serialize the parsed template then the only thing left over would be to suck out the type info from the calling code for the compiler.... Dang you! --> http://xkcd.com/356/
Apr 01 2008
BCS wrote:Heinz wrote:Funny you mention that since that has been suggested and even worked out as a solution by Burton Radons: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=11436I think it has been asked before....can a function template be exported in a dll?currently no. theoretically.... If you were able to put a compiler in the DLL and serialize the parsed template then the only thing left over would be to suck out the type info from the calling code for the compiler.... Dang you! --> http://xkcd.com/356/
Apr 01 2008
Robert Fraser wrote:BCS wrote:Almost, but not quite, I'm thinking more along the lines of thunk generation without the original code available. I'd "only" need access to the the symbol tables of the types the template accesses and some partially processed template code. Also rather than drop out an object file and then link that in, I'm thinking of actually compiling directly to RAM and then returning a function pointer. As I said, close, but not quite the same.Heinz wrote:Funny you mention that since that has been suggested and even worked out as a solution by Burton Radons: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.annou ce&article_id=11436I think it has been asked before....can a function template be exported in a dll?currently no. theoretically.... If you were able to put a compiler in the DLL and serialize the parsed template then the only thing left over would be to suck out the type info from the calling code for the compiler.... Dang you! --> http://xkcd.com/356/
Apr 02 2008