Re: template instantiation question

2015-03-18 Thread Ali Çehreli via Digitalmars-d-learn
(My earlier response seems to be lost; trying one more time.) On 03/18/2015 12:09 PM, Dmitri Makarov wrote: > On Wednesday, 18 March 2015 at 18:26:07 UTC, Ali Çehreli wrote: >> $ nm b.o | grep transmogrify >> W _D1c8__T1CTvZ1C12transmogrifyMFNaNbNiNfZi > > What compiler do you u

Re: template instantiation question

2015-03-18 Thread Dmitri Makarov via Digitalmars-d-learn
On Wednesday, 18 March 2015 at 18:26:07 UTC, Ali Çehreli wrote: $ nm b.o | grep transmogrify W _D1c8__T1CTvZ1C12transmogrifyMFNaNbNiNfZi What compiler do you use? For me, neither a.o nor b.o contain transmogrify definition: $ dmd -c -Ix x/i/a.d $ nm a.o | grep trans

Re: template instantiation question

2015-03-18 Thread Ali Çehreli via Digitalmars-d-learn
On 03/18/2015 11:03 AM, Dmitri Makarov wrote: > When these modules compiled separately, I assume, both a.o and b.o > contain a definition of i.c.S!void.S.transmogrify() instance. That is very likely but I played with different three files for a while and failed to see that. > how is the symbo

template instantiation question

2015-03-18 Thread Dmitri Makarov via Digitalmars-d-learn
I have three modules a.d, b.d, and c.d: file a.d:``` module i.a; import i.c, i.b; final class A { public: void foo() { a.transmogrify(); } S!void a; } ``` -- file b.d:``` module i.b; import i.a, i.c; class B { public: S!void b; } ``` -- file c.d:``` module