<div dir="ltr"><div>What's the difference bw _Z21test_D20161202T141925IiET_S0_ and _Z21test_D20161202T141925IiEii? mangleof produces the one that's not in the library produced:</div><div><br></div><div>test.cpp:</div><div></div><div>```</div><div>template<typename T><br></div><div><div>T test_D20161202T141925(T a);</div></div><div><div>template int test_D20161202T141925<int>(int);</div></div><div>```</div><div><br></div><div>clang++ -shared -o libtest.so test.cpp</div><div><br></div><div>c++filt _Z21test_D20161202T141925IiET_S0_<br></div><div><div>int test_D20161202T141925<int>(int)</div><div><br></div><div>c++filt _Z21test_D20161202T141925IiEii</div><div>int test_D20161202T141925<int>(int)</div></div><div><br></div><div>nm libtest.so|grep test_D20161202T141925:</div><div><div>0000000000000ae0 W _Z21test_D20161202T141925IiET_S0_</div></div><div>```</div><div><br></div><div>test.d:</div><div>```</div><div><div>extern(C++){<br></div><div>  void test_D20161202T141743();</div><div>  T test_D20161202T141925(T)(T a);</div><div>}</div><div><br></div><div>void test(){</div><div>  assert(test_D20161202T141925!int.mangleof == "_Z21test_D20161202T141925IiEii"); </div><div>// but I would expect _Z21test_D20161202T141925IiET_S0_ (otherwise, undefined symbol)</div><div>}<br></div><div>```<br></div><div><br></div><div></div></div></div>