Template Question

Jiyan jiyan at jiyan.info
Sun Nov 19 19:31:53 UTC 2017


On Sunday, 19 November 2017 at 19:28:37 UTC, Jonathan M Davis 
wrote:
> On Sunday, November 19, 2017 19:22:51 Jiyan via 
> Digitalmars-d-learn wrote:
>> Hello,
>>
>> i wanted to ask why this isnt working:
>>
>> struct Text(T : char)
>> {
>>   size_t _len;
>>   T* _ptr;
>> }
>>
>> Thanks :)
>
> What about it isn't working? I think that you need to explain 
> what you're trying to do and what you think that this code 
> should be doing but isn't.
>
> - Jonathan M Davis

Text X;

Here X would be an Object from type Text with T being char when 
i'm right.
But this doesn't compile!
Thanks :)


More information about the Digitalmars-d-learn mailing list