On Tuesday, 21 June 2016 at 06:25:26 UTC, Jacob Carlborg wrote:
On 2016-06-20 22:52, Guillaume Chatelet wrote:
[...]
A guess: "tiargs" is the types of the values passed to the
template.
"tdtypes" is the types the template is instantiated with.
void foo(T)(T* a);
int b;
foo!(int)(&b*);
"tiargs" is "int*" and "tdtypes" is "int". But this can easily
be confirmed using some printf debugging.
[...]
Are the types the same objects so you can compare by just
comparing the pointers?
AFAIK basic types are instantiated once and reused:
https://github.com/dlang/dmd/blob/b67694a0d74437d3a1581da2b9f1b785dc7b3c88/src/mtype.d#L861
So comparing pointers wouldn't work.