Hi all,
I am trying to learn D templates with Philippe Sigaud's "D
Templates: A Tutorial". So far so good. I have completed first 19
pages and in the 20th page, I found an obstacle. This is the code.
```d
module rank1;
template rank(T)
{
static if (is(T t == U[], U)) // is T an array of
On Saturday, 19 March 2022 at 00:16:48 UTC, user1234 wrote:
That crashes because of the creation of `Bar b` member, which
itself has a Bar b member, which itself...
Mhmm... So There's Foo with Bar b, which has Bar b which has Bar
b which... just keeps going over and over again.
It appears
On Saturday, 19 March 2022 at 00:05:54 UTC, Salih Dincer wrote:
Greetings to all...
There are nested classes as below. But beware, there's also
inheritance, extra! If you construct ```Bar b``` from main(),
it's okay. But if declare the constructor in Foo(), the program
crashes with a
Greetings to all...
There are nested classes as below. But beware, there's also
inheritance, extra! If you construct ```Bar b``` from main(),
it's okay. But if declare the constructor in Foo(), the program
crashes with a segmentation error.
Is this not legal? Like two mirrors are facing
On 3/18/22 14:54, WhatMeWorry wrote:
> size_t is an alias to one of the unsigned integral basic types, and
> represents a type that is large enough to represent an offset into all
> addressable memory.
In practice, that general description means "size_t is either ulong or
uint" depending on
On Friday, 18 March 2022 at 21:54:55 UTC, WhatMeWorry wrote:
Isn't ulong an integer? And isn't memory addresses 64 bits long?
Only if you are doing a 64 bit build. Try using -m64
Quoting the D documentation:
size_t is an alias to one of the unsigned integral basic types,
and represents a type that is large enough to represent an offset
into all addressable memory. And I have a line of code:
size_t huge = ulong.max;
dmd GC.d
GC.d(29): Error: cannot implicitly
On Fri, Mar 18, 2022 at 11:16:51AM -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> tldr; I am talking on a soap box with a big question mind hovering
> over on my head: Why can't I accept pulling in dependencies
> automatically?
Because it's a bad idea for your code to depend on some
On Thursday, 17 March 2022 at 14:00:45 UTC, kdevel wrote:
If ```import std.regex;``` is commented out or if
```-checkaction=context``` is removed from the cmd line the
unittest passes. Can anybody reproduce this?
https://run.dlang.io/is/GYDUBz
File an issue, I'd say. The worst thing that can
tldr; I am talking on a soap box with a big question mind hovering over
on my head: Why can't I accept pulling in dependencies automatically?
On 3/18/22 07:48, H. S. Teoh wrote:
> As a package manager, dub is OK, it does its job.
As a long-time part of the D community, I am ashamed to admit
On Fri, Mar 18, 2022 at 04:13:36AM +, Alain De Vos via Digitalmars-d-learn
wrote:
> Dlang includes some good ideas.
> But dub pulls in so much stuff. Too much for me.
> I like things which are clean,lean,little,small.
> But when i use dub it links with so many libraries.
> Are they really
On Friday, 4 March 2022 at 17:17:17 UTC, MoonlightSentinel wrote:
On Friday, 4 March 2022 at 01:30:00 UTC, Leonardo wrote:
Thanks but not worked here.
```
[leonardo@leonardo-pc dimportc]$ dmd --version
DMD64 D Compiler v2.098.1
```
Please retry with the
On Friday, 18 March 2022 at 03:24:10 UTC, Era Scarecrow wrote:
On Tuesday, 8 March 2022 at 22:28:27 UTC, bauss wrote:
What D just needs is a way to specify the entry point, in
which it just defaults to the first main function found, but
could be any function given.
Which is similar to what
On Friday, 18 March 2022 at 04:13:36 UTC, Alain De Vos wrote:
Dlang includes some good ideas.
But dub pulls in so much stuff. Too much for me.
I like things which are clean,lean,little,small.
But when i use dub it links with so many libraries.
Are they really needed ?
And how do you compare to
On Friday, 18 March 2022 at 04:13:36 UTC, Alain De Vos wrote:
Dlang includes some good ideas.
But dub pulls in so much stuff. Too much for me.
I like things which are clean,lean,little,small.
But when i use dub it links with so many libraries.
Are they really needed ?
And how do you compare to
15 matches
Mail list logo