How to define property type to Array!struct?

Steven Schveighoffer schveiguy at gmail.com
Wed Dec 15 14:45:45 UTC 2021


On 12/15/21 9:41 AM, Stanislav Blinov wrote:
> On Wednesday, 15 December 2021 at 11:36:41 UTC, Manfred Nowak wrote:
>> On Tuesday, 14 December 2021 at 08:28:01 UTC, WebFreak001 wrote:
>> [...]
>>> Alternatively, remove the template `()` from your `struct Header`
>>
>> What is the semantic sense of a template having no parameters?
>>
>> Although the documentation declares such a template to be 
>> syntactically correct, not a single example suggests a meaning.
> 
> To add to other responses, certain features are only available for 
> templates, such as constraints and `auto ref` parameters.

Oh yeah, that reminds too -- a templated struct will have all member 
function attributes inferred.

-Steve


More information about the Digitalmars-d-learn mailing list