[OT] Generative C++

12345swordy via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 28 08:09:32 PDT 2017


On Friday, 28 July 2017 at 14:46:46 UTC, Stefan Koch wrote:
> On Friday, 28 July 2017 at 14:39:04 UTC, 12345swordy wrote:
>> On Friday, 28 July 2017 at 07:49:02 UTC, Yuxuan Shui wrote:
>>> Someone made an interesting proposal to C++: 
>>> https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf
>>>
>>> Thoughts?
>>
>> Can D achieve this "metaclasses" using templates and mixins? I 
>> not familiar of any features that D can use to enforced coding 
>> standard. So correct me if I am wrong as I am not a D guru 
>> here, I am more familiar with c++ then anything else atm.
>
> Yes we can do that with mixins __traits and ctfe.

Can you provide a simple example of this? Thanks.


More information about the Digitalmars-d mailing list