www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - {OT} Youtube video: finding an eliusive bug with CTFE

reply Stefan Koch <uplink.coder googlemail.com> writes:
Hi Guys,

while building newCTFE is ran into a really nasty bug.
Which took me hours to find, but with CTFE and __traits it is 
preventable and will never haunt me again.
Because I was so happy that I could prevent this bug;
I want to share it with the whole world:

https://www.youtube.com/watch?v=9seMTaNmQDI

Cheers,
Stefan
Apr 13 2017
parent Meta <jared771 gmail.com> writes:
On Thursday, 13 April 2017 at 10:29:06 UTC, Stefan Koch wrote:
 Hi Guys,

 while building newCTFE is ran into a really nasty bug.
 Which took me hours to find, but with CTFE and __traits it is 
 preventable and will never haunt me again.
 Because I was so happy that I could prevent this bug;
 I want to share it with the whole world:

 https://www.youtube.com/watch?v=9seMTaNmQDI

 Cheers,
 Stefan
Great video. I also use static assert a lot for checking stuff like this. Combined with CTFE and D's introspection capabilities it's extremely useful if you need to, for example, ensure that the members of two structs are in the same order, or that their members stay in sync.
Apr 13 2017