Re: This code completely breaks the compiler:

2022-08-19 Thread Ruby The Roobster via Digitalmars-d-learn
On Friday, 19 August 2022 at 05:50:17 UTC, Mike Parker wrote: On Friday, 19 August 2022 at 04:25:25 UTC, Ruby The Roobster wrote: [...] If the template is never instantiated, it never makes it into the executable. It doesn't matter if it's in production or not, and has nothing to do with t

Re: This code completely breaks the compiler:

2022-08-18 Thread Mike Parker via Digitalmars-d-learn
On Friday, 19 August 2022 at 04:25:25 UTC, Ruby The Roobster wrote: So that's why it compiled. Still, I believe that stuff like this ought to be detected at compile time, as supposed to in a unittest or, if someone forgot to write the tests, in production. If the template is never instanti

Re: This code completely breaks the compiler:

2022-08-18 Thread Ruby The Roobster via Digitalmars-d-learn
On Friday, 19 August 2022 at 04:16:28 UTC, JG wrote: On Friday, 19 August 2022 at 03:13:03 UTC, Ruby The Roobster wrote: On Friday, 19 August 2022 at 03:10:38 UTC, Ruby The Roobster wrote: This snippet compiles. Even if `dsds` and `sadsad` are defined nowhere, this code compiles. [SNIP] The

Re: This code completely breaks the compiler:

2022-08-18 Thread JG via Digitalmars-d-learn
On Friday, 19 August 2022 at 03:13:03 UTC, Ruby The Roobster wrote: On Friday, 19 August 2022 at 03:10:38 UTC, Ruby The Roobster wrote: This snippet compiles. Even if `dsds` and `sadsad` are defined nowhere, this code compiles. [SNIP] The reason why this compiles is because of the varidic t

Re: This code completely breaks the compiler:

2022-08-18 Thread Ruby The Roobster via Digitalmars-d-learn
On Friday, 19 August 2022 at 03:10:38 UTC, Ruby The Roobster wrote: This snippet compiles. Even if `dsds` and `sadsad` are defined nowhere, this code compiles. [SNIP] The reason why this compiles is because of the varidic template parameter, `Mtypes`. Either there is something I'm missing,