A modest proposal: eliminate template code bloat

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Apr 8 09:14:42 PDT 2012


On 4/8/12 10:59 AM, Artur Skawina wrote:
> On 04/08/12 17:20, Dmitry Olshansky wrote:
>> On 08.04.2012 18:21, Artur Skawina wrote:
>>> On 04/08/12 13:01, Dmitry Olshansky wrote:
>>>> 3. After any function was generated compiler checks an entry in the duplicate table that matches size, followed by matching checksum and only then (if required) doing a straight memcmp. If it happens that there is a match compiler just throws generated code away and _aliases_ it's symbol to that of a matched entry.
>>>> (so there has to be an alias table if there isn't one already)
>>> [...]
>>>> Thoughts?
>>>
>>> Don't forget that this needs to work:
>>>
>>>      static auto f(T)(T a) { return a; }
>>>      assert(cast(void*)&f!int!=cast(void*)&f!uint);
>
>> A reference to spec page plz.
>
> A reference to *a* D spec, please...
>
> There isn't one, but that does not mean that common sense does
> not need to apply.

Doesn't apply to C++.

Andrei




More information about the Digitalmars-d mailing list