Re: Any easy way to check if an object have inherited an interface?

2019-07-23 Thread XavierAP via Digitalmars-d-learn
On Monday, 22 July 2019 at 21:34:18 UTC, solidstate1991 wrote: It seems that I've to write my own function that searches in the given object's classinfo.interfaces since I couldn't find anything related in Phobos. Do you mean...? interface I {} class C : I {} void main() { C c1;

Re: accuracy of floating point calculations: d vs cpp

2019-07-23 Thread Ali Çehreli via Digitalmars-d-learn
On 07/22/2019 08:48 PM, Timon Gehr wrote: > This is probably not your problem, but it may be good to know anyway: D > allows compilers to perform arbitrary "enhancement" of floating-point > precision for parts of the computation, including those performed at > compile time. I think this is stupid

Re: Why does a switch break cause a segmentation fault

2019-07-23 Thread Boris Carvajal via Digitalmars-d-learn
On Tuesday, 23 July 2019 at 08:04:07 UTC, adamgoldberg wrote: On Tuesday, 23 July 2019 at 00:01:09 UTC, Exil wrote: On Monday, 22 July 2019 at 22:05:17 UTC, adamgoldberg wrote: Hey, I just happened to be writing a program in D an stumbled upon a bug, that causes it to terminate after receiving

Blog Post #0055: MVC VIII - Dynamically Loading a TreeView

2019-07-23 Thread Ron Tarrant via Digitalmars-d-learn
Hi y'all, This week's first post is entry #8 in the MVC series and covers loading up a TreeView with a decorated list of system fonts. Decorations include varying the size, weight, and style as well as the font face. You can view it here: https://gtkdcoding.com/2019/07/23/0055-mvc-viii-dynami

Re: Why does a switch break cause a segmentation fault

2019-07-23 Thread adamgoldberg via Digitalmars-d-learn
On Tuesday, 23 July 2019 at 00:01:09 UTC, Exil wrote: On Monday, 22 July 2019 at 22:05:17 UTC, adamgoldberg wrote: Hey, I just happened to be writing a program in D an stumbled upon a bug, that causes it to terminate after receiving a SEGV signal, nothing wierd so far but it looks everything I