sqlite3 library which can read class instances (not structs)?

2025-03-06 Thread Andy Valencia via Digitalmars-d-learn
Is there a sqlite3 interface library which can correctly read into instances? sqlite3-d will let me compile with a class, but it segv's when run. ddbc seems to support only structs, and I can use it to punch in one value at a time out of each row result. But that feels clunky, and I'd avoid

Re: Issue with struct invariants

2025-03-06 Thread Kirill Kryukov via Digitalmars-d-learn
Thanks for checking. Looks like it works with DMD, LDC, and older GDC, so this could be a GDC regression. I'll try to post it in GDC (GCC) Bugzilla if I can get an account there.

Re: What are the pointer aliasing rules in D?

2025-03-06 Thread Paul Backus via Digitalmars-d-learn
On Thursday, 6 March 2025 at 10:46:20 UTC, tmp wrote: I come from a C/C++ background where the pointer aliasing rules make an assumption that pointers to different types cannot alias each other (with the exception of a pointer to char). This is known as the strict aliasing rule and while it can

Re: What are the pointer aliasing rules in D?

2025-03-06 Thread Ali Çehreli via Digitalmars-d-learn
On 3/6/25 6:34 AM, Paul Backus wrote: > are allowed to refer to the same memory location. However, there are > still cases where *dereferencing* those pointers can lead to undefined > behavior. This topic came up among colleagues recently. I think such restrictions come from CPU architectures w

Re: What are the pointer aliasing rules in D?

2025-03-06 Thread Dmitry Olshansky via Digitalmars-d-learn
On Thursday, 6 March 2025 at 16:11:37 UTC, Ali Çehreli wrote: On 3/6/25 6:34 AM, Paul Backus wrote: > are allowed to refer to the same memory location. However, there are > still cases where *dereferencing* those pointers can lead to undefined > behavior. This topic came up among colleagues rec