Template Class With Default Values

bauss jj_1337 at live.dk
Sun Mar 4 14:44:13 UTC 2018


On Sunday, 4 March 2018 at 11:59:52 UTC, Mike Parker wrote:
> On Sunday, 4 March 2018 at 11:35:23 UTC, bauss wrote:
>> Why is the following not working?
>>
>> class Foo(string baz = "baz")
>> {
>>     mixin("int " ~ baz ~ ";");
>> }
>>
>> class Bar : Foo
>> {
>> }
>>
>> Shouldn't it implicit do, without me having to do it manually?
>>
>> class Bar : Foo!"baz"
>> {
>> }
>>
>
> class Bar : Foo!()
> {
> }

Still seems unneccessary.


More information about the Digitalmars-d-learn mailing list