On Tuesday, 5 May 2020 at 04:02:06 UTC, RazvanN wrote:
truct K
{
~this() nothrow {}
}
void main()
{
static class C
{
this(K, int) {}
}
static int foo(bool flag)
{
if (flag)
throw new Exception("hello");
return 1;
}
try
{
truct K
{
~this() nothrow {}
}
void main()
{
static class C
{
this(K, int) {}
}
static int foo(bool flag)
{
if (flag)
throw new Exception("hello");
return 1;
}
try
{
new C(K(), foo(true));
}
On Monday, 4 May 2020 at 17:00:21 UTC, Anonymouse wrote:
TL;DR: Is there a way to tell what module or other section of a
codebase is eating memory when compiling?
I'm keeping track of compilation memory use using zsh `time`
with some environmental variables. It typically looks like this.
On 2020-05-03 21:59:54 +, Harry Gillanders said:
I'm unsure as to which part is unclear,
Well, I was trapped by this formatting/syntax:
size_t drawableCharacterCount (CodePoints) (auto ref CodePoints
codePoints)
if (isInputRange!CodePoints && is(ElementType!CodePoints :
TL;DR: Is there a way to tell what module or other section of a
codebase is eating memory when compiling?
I'm keeping track of compilation memory use using zsh `time` with
some environmental variables. It typically looks like this.
```
$ time dub build -c dev
Performing "debug" build using
On Monday, 4 May 2020 at 11:50:49 UTC, Steven Schveighoffer wrote:
I'm not sure if Ali is referring to this, but the usage of
scope to allocate on the stack was at one time disfavored by
the maintainers. This is why std.typecons.scoped was added (to
hopefully remove that feature).
Though, if
On Mon, May 04, 2020 at 09:33:27AM -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
[...]
> Now it's news to me that 'new' does not allocate on the heap when
> 'scope' is used. I'm not sure I'm comfortable with it but that's true.
> Is this unique? Otherwise, 'new' always allocates on the heap,
On 5/4/20 12:33 PM, Ali Çehreli wrote:
Now it's news to me that 'new' does not allocate on the heap when
'scope' is used. I'm not sure I'm comfortable with it but that's true.
Is this unique? Otherwise, 'new' always allocates on the heap, no?
This feature was in D1 AFAIK.
So it's really old
On 5/4/20 2:47 AM, Olivier Pisano wrote:
On Monday, 4 May 2020 at 09:20:06 UTC, Ali Çehreli wrote:
On 4/30/20 10:04 AM, Ben Jones wrote:> On Thursday, 30 April 2020 at
16:55:36 UTC, Robert M. Münch wrote:
> I think you want to use scope rather than auto which will put
the class
> on the stack
On 5/4/20 5:47 AM, Olivier Pisano wrote:
On Monday, 4 May 2020 at 09:20:06 UTC, Ali Çehreli wrote:
On 4/30/20 10:04 AM, Ben Jones wrote:> On Thursday, 30 April 2020 at
16:55:36 UTC, Robert M. Münch wrote:
> I think you want to use scope rather than auto which will put
the class
> on the stack
On Monday, 4 May 2020 at 01:49:28 UTC, Ali Çehreli wrote:
On 5/3/20 1:44 PM, Marcone wrote:
[...]
Still, the type of a variable would determine whether whether
it's iterable.
As an improvement, the following program can be changed to call
use() recursively to visit all members of e.g.
On Monday, 4 May 2020 at 09:20:06 UTC, Ali Çehreli wrote:
On 4/30/20 10:04 AM, Ben Jones wrote:> On Thursday, 30 April
2020 at 16:55:36 UTC, Robert M. Münch wrote:
> I think you want to use scope rather than auto which will put
the class
> on the stack and call its destructor:
>
On 4/30/20 10:04 AM, Ben Jones wrote:> On Thursday, 30 April 2020 at
16:55:36 UTC, Robert M. Münch wrote:
> I think you want to use scope rather than auto which will put the class
> on the stack and call its destructor:
> https://dlang.org/spec/attribute.html#scope
That is correct about
On 5/3/20 2:59 PM, Harry Gillanders wrote:> On Sunday, 3 May 2020 at
12:19:30 UTC, Robert M. Münch wrote:
> an `auto ref` parameter[1] in a
> function template is essentially a parameter that receives the
> argument by reference if the templated type is a value-type,
Please replace "a
14 matches
Mail list logo