Re: How can overloads be distinguished on attributes alone?

2023-07-31 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, July 31, 2023 4:55:44 AM MDT Quirin Schroll via Digitalmars-d-learn wrote: > Apparently, functions can be overloaded solely distinguished by > attributes: > ```d > void f(ref int x) pure { x = 1; } > void f(ref int x) { x = 2; static int s; ++s; } > ``` > > I thought that, maybe, a

Re: How can overloads be distinguished on attributes alone?

2023-07-31 Thread bachmeier via Digitalmars-d-learn
On Monday, 31 July 2023 at 16:52:03 UTC, Dennis wrote: On Monday, 31 July 2023 at 16:09:11 UTC, bachmeier wrote: Is there a reason it would be difficult to make this not compile? No, except that might result in code breakage. The only way you could have code breakage is if you have ``` void

Re: How can overloads be distinguished on attributes alone?

2023-07-31 Thread Dennis via Digitalmars-d-learn
On Monday, 31 July 2023 at 16:09:11 UTC, bachmeier wrote: Is there a reason it would be difficult to make this not compile? No, except that might result in code breakage.

Re: Anyone help me with a stack dump?

2023-07-31 Thread Cecil Ward via Digitalmars-d-learn
On Monday, 31 July 2023 at 14:38:52 UTC, ryuukk_ wrote: Your problem lies at line 1541 You can use `ddemangle` executable to make mangled names readable, i don't know if it comes with the compiler ``` _platform_memmove pure nothrow ref @trusted wchar[] core.internal.array.appending._d_arraya

Re: Anyone help me with a stack dump?

2023-07-31 Thread ryuukk_ via Digitalmars-d-learn
Your problem lies at line 1541 You can use `ddemangle` executable to make mangled names readable, i don't know if it comes with the compiler ``` _platform_memmove pure nothrow ref @trusted wchar[] core.internal.array.appending._d_arrayappendT!(wchar[], char)._d_arrayappendT(scope return ref

Re: Anyone help me with a stack dump?

2023-07-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/31/23 9:09 AM, Cecil Ward wrote: The unitttests that I have just put in crash spectacularly with an access violation. I built the code with LDC for Aarch64 / OSX and I fired up lldb. I now have to learn lldb quick. (BTW Where can I get an x86 / linux build of lldb or similar ?) This is t

Anyone help me with a stack dump?

2023-07-31 Thread Cecil Ward via Digitalmars-d-learn
The unitttests that I have just put in crash spectacularly with an access violation. I built the code with LDC for Aarch64 / OSX and I fired up lldb. I now have to learn lldb quick. (BTW Where can I get an x86 / linux build of lldb or similar ?) This is the stack dump, and I could do with some

Re: How can overloads be distinguished on attributes alone?

2023-07-31 Thread Dennis via Digitalmars-d-learn
On Monday, 31 July 2023 at 10:55:44 UTC, Quirin Schroll wrote: What am I missing here? The duplicate definition check doesn't consider whether a function is actually unambiguously callable (without e.g. traits getOverloads), it only prevents creating the same linker symbol multiple time. So

How can overloads be distinguished on attributes alone?

2023-07-31 Thread Quirin Schroll via Digitalmars-d-learn
Apparently, functions can be overloaded solely distinguished by attributes: ```d void f(ref int x) pure { x = 1; } void f(ref int x) { x = 2; static int s; ++s; } ``` I thought that, maybe, a `pure` context calls the `pure` function and an impure context calls the impure function, but no:

Re: how to make pragma(lib)'s path relative to the package's path?

2023-07-31 Thread Johan via Digitalmars-d-learn
On Monday, 31 July 2023 at 00:32:07 UTC, ryuukk_ wrote: I reworked the PR, here is the new link: https://github.com/dlang/dmd/pull/15479 It basically add support for ``pragma(lib, "local:bin/lib.a");`` Makes things easier, and doesn't change any old behavior Before continuing with the PR, th

Re: openssl 1.1 vs. 3.0 for vibe.d:tls on Ubuntu 22.04

2023-07-31 Thread Guillaume Lathoud via Digitalmars-d-learn
On Friday, 28 July 2023 at 08:56:17 UTC, Guillaume Lathoud wrote: ... Now to the actual question: I am a bit confused since the source code of `vibe-d:tls` seem to support openssl-3.0, as visible e.g. in [1] but then in the config [2] I don't see anything like `"openssl-3.0"`. Maybe I missed