Re: @disable("reason")

2020-01-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, January 7, 2020 5:23:48 PM MST Marcel via Digitalmars-d-learn wrote: > Hello! > I'm writing a library where under certain conditions i need all > the default constructors to be disabled. I would like to tell the > user why they can't instantiate the struct. > Is there a way to do that?

Re: Practical parallelization of D compilation

2020-01-07 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jan 08, 2020 at 04:40:02AM +, Guillaume Lathoud via Digitalmars-d-learn wrote: > Hello, > > One of my D applications grew from a simple main and a few source > files to more than 200 files. Although I minimized usage of > templating and CTFE, the compiling time is now about a minute.

Practical parallelization of D compilation

2020-01-07 Thread Guillaume Lathoud via Digitalmars-d-learn
Hello, One of my D applications grew from a simple main and a few source files to more than 200 files. Although I minimized usage of templating and CTFE, the compiling time is now about a minute. I did not find any solution to take advantage of having multiple cores during compilation, lest I wo

@disable("reason")

2020-01-07 Thread Marcel via Digitalmars-d-learn
Hello! I'm writing a library where under certain conditions i need all the default constructors to be disabled. I would like to tell the user why they can't instantiate the struct. Is there a way to do that?

Re: What is the difference between a[x][y] and a[x,y]?

2020-01-07 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 07, 2020 at 06:38:59PM +0100, Robert M. Münch via Digitalmars-d-learn wrote: > I read all the docs but I'm not toally sure. Is it that [x][y] is a 2D > array-index, where as [x,y] is a slice? arr[x][y] is indexing an array of arrays. arr[x,y] is indexing an actual multi-dimensional ar

Re: What is the difference between a[x][y] and a[x,y]?

2020-01-07 Thread Robert M. Münch via Digitalmars-d-learn
On 2020-01-07 17:42:48 +, Adam D. Ruppe said: So [x][y] indexes an array of arrays. Yes, that's what I understand. And both can be dynamic, so that I can have a "flattering" layout where not all arrays have the same length. [x,y] indexes a single array that has two dimensions. Does

Re: What is the difference between a[x][y] and a[x,y]?

2020-01-07 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 7 January 2020 at 17:38:59 UTC, Robert M. Münch wrote: I read all the docs but I'm not toally sure. Is it that [x][y] is a 2D array-index, where as [x,y] is a slice? So [x][y] indexes an array of arrays. [x,y] indexes a single array that has two dimensions. This can be kinda conf

What is the difference between a[x][y] and a[x,y]?

2020-01-07 Thread Robert M. Münch via Digitalmars-d-learn
I read all the docs but I'm not toally sure. Is it that [x][y] is a 2D array-index, where as [x,y] is a slice? But the example in docs for opIndexAssign uses the [x,y] syntax, which is confusing: ``` struct A { int opIndexAssign(int value, size_t i1, size_t i2); } void test() { A a;

Re: CT regex in AA at compile time

2020-01-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/7/20 11:00 AM, Taylor Hillegeist wrote: On Tuesday, 7 January 2020 at 15:51:21 UTC, MoonlightSentinel wrote: On Tuesday, 7 January 2020 at 15:40:58 UTC, Taylor Hillegeist wrote: but I can't get it to work. it says its an Error: non-constant expression. I imagine this has to do with the c

Re: CT regex in AA at compile time

2020-01-07 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 7 January 2020 at 15:40:58 UTC, Taylor Hillegeist wrote: I'm trying to trick the following code snippet into compilation. enum TokenType{ //Terminal Plus, Minus, LPer, RPer, Number, } static auto Regexes =[ TokenType.Plus: ctRegex!

Re: CT regex in AA at compile time

2020-01-07 Thread Taylor Hillegeist via Digitalmars-d-learn
On Tuesday, 7 January 2020 at 15:51:21 UTC, MoonlightSentinel wrote: On Tuesday, 7 January 2020 at 15:40:58 UTC, Taylor Hillegeist wrote: but I can't get it to work. it says its an Error: non-constant expression. I imagine this has to do with the ctRegex template or something. maybe there is

Re: CT regex in AA at compile time

2020-01-07 Thread MoonlightSentinel via Digitalmars-d-learn
On Tuesday, 7 January 2020 at 15:40:58 UTC, Taylor Hillegeist wrote: but I can't get it to work. it says its an Error: non-constant expression. I imagine this has to do with the ctRegex template or something. maybe there is a better way? Does anyone know? This issue is unrelated to ctRegex,

CT regex in AA at compile time

2020-01-07 Thread Taylor Hillegeist via Digitalmars-d-learn
I'm trying to trick the following code snippet into compilation. enum TokenType{ //Terminal Plus, Minus, LPer, RPer, Number, } static auto Regexes =[ TokenType.Plus: ctRegex!(`^ *\+`), TokenType.Minus: ctRegex!(`^ *\-`), TokenType.LPer:

Blog Post #0097: The HeaderBar

2020-01-07 Thread Ron Tarrant via Digitalmars-d-learn
When is a Titlebar not a Titlebar? When it's a HeaderBar. Today's post starts an examination of the HeaderBar and it's capabilities. You can find it here: https://gtkdcoding.com/2020/01/07/0097-headerbar.html