template cannot use local as parameter to non-global template

simendsjo simendsjo at gmail.com
Sun Mar 17 09:36:21 PDT 2013


On Sunday, 17 March 2013 at 16:21:25 UTC, Timon Gehr wrote:
> On 03/17/2013 05:15 PM, simendsjo wrote:
>> On Sunday, 17 March 2013 at 15:45:54 UTC, Timon Gehr wrote:
>>> On 03/17/2013 01:54 PM, simendsjo wrote:
>>>> I get a lot of these errors, and they can be quite tricky to 
>>>> get around
>>>> and hurts my API.. Is this a temporary restriction in DMD, 
>>>> or is it
>>>> another reason why this doesn't work?
>>>>
>>>> Error: template instance template!local cannot use local 
>>>> 'local' as
>>>> parameter to non-global template innerTemplate(alias T)
>>>
>>> http://d.puremagic.com/issues/show_bug.cgi?id=5710
>>
>> Looks like the same issue. For me the use-case was a bit 
>> different though..
>> I want to access struct members at CT only to look for UDAs, 
>> it's type etc.
>> It works with workarounds, but the code gets ugly, and much 
>> convenience
>> is lost..
>>
>> Too bad it looks like a wont-fix.
>
> It is not a wont-fix, and it actually should work.

All the talk there looks to be around delegates. Would the same 
fix work for my struct members?


More information about the Digitalmars-d-learn mailing list