[Issue 7657] ReturnType fails for simple templated functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 19 19:12:57 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7657


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-04-19 19:13:53 PDT ---
(In reply to comment #1)
> Except that if a template hasn't been initialized, it doesn't even really
> _exist_ as far as the compiler is concerned. It's a template for something, not
> an actual function or type.
> 
> So, while I can see why you'd want this, I just don't see how it could be done
> with how templates are implemented.

Yes, and come to think of it it would be dangerous to allow this feature. If at
a later time a template had its return type changed to 'auto' it would break
existing code that relied on ReturnType working on such a template.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list