new DIP40: Template parameter deduction for constructors

deadalnix deadalnix at gmail.com
Tue May 14 01:04:46 PDT 2013


On Tuesday, 14 May 2013 at 07:28:57 UTC, Timothee Cour wrote:
>>
>> I think that should be consistent with the deduction mechanism 
>> proposed
>>> in the DIP: foo is struct not in scope until template foo(T) 
>>> is
>>> instantiated.
>>>
>>
>
>>  No it is not. The DIP states "find all constructors".
>
>
> it said  'Find all matching class/struct types in scope', isn't 
> that enough
> or am I missing something?
>
> To clarify, I've added 3 out of scope structs named A in the 
> example
> section to clarify that they won't be included in the overload 
> set.
> see the ones marked '//not in scope'

I think the best here is to specify that the rule is the same 
than eponymous funtion and IFTY. Otherwise we'll have 2 different 
specs with small difference here and there. And that sucks.


More information about the Digitalmars-d mailing list