On Saturday, 1 October 2022 at 01:37:00 UTC, Steven Schveighoffer
wrote:
On 9/30/22 11:57 AM, Quirin Schroll wrote:
Also, is the alignment of any type guaranteed to be a power of
2?
In practice, it's not necessarily a power of 2, but it's *at
least* 16 bytes.
**Types** always require some
extern(C++)?
Why do you think Rust export C++ linkage?
And why do you think Rust export some kind of OO object model
linkage?
Do it in plain C style, you may make it work.
As said, check how it's done in:
https://code.dlang.org/packages/rust_interop_d
On Friday, 30 September 2022 at 06:25:33 UTC, Imperatorn wrote:
On Friday, 30 September 2022 at 00:18:42 UTC, Ruby The Roobster
wrote:
On Thursday, 29 September 2022 at 16:07:59 UTC, mw wrote:
On Thursday, 29 September 2022 at 16:02:43 UTC, Ruby The
Roobster wrote:
Is there any way one can
On 9/30/22 11:57 AM, Quirin Schroll wrote:
When I do `new void[](n)`, is that buffer allocated with an alignment of
1 or what are the guarantees? How can I set an alignment? Also, is the
alignment of any type guaranteed to be a power of 2?
In practice, it's not necessarily a power of 2, but
On 9/30/22 14:11, solidstate1991 wrote:
> extern (C) public int registerDDelegate(alias Func,
That can be a lambda that takes ClassType. I wrote the following along
with place holder as I assumed them to be:
class C {
string s;
void foo() {
import std.stdio : writeln;
On Saturday, 1 October 2022 at 00:32:28 UTC, tsbockman wrote:
alias Chunk = AliasSeq!(ubyte, ushort, uint, ulong,
Chunk16)[shift];
Oops, I forgot that `ulong.alignof` is platform dependent. It's
probably best to just go ahead and explicitly specify the
alignment for all `Chunk`
On Friday, 30 September 2022 at 15:57:22 UTC, Quirin Schroll
wrote:
When I do `new void[](n)`, is that buffer allocated with an
alignment of 1 or what are the guarantees?
It is guaranteed an alignment of at least 1 because `void.alignof
== 1` (and because that is the lowest possible integer
On Thursday, 29 September 2022 at 12:49:06 UTC, Riccardo M wrote:
On Thursday, 29 September 2022 at 11:13:15 UTC, Ogi wrote:
So it turns out that D's structs are a much better match for
C++'s classes in this case. But why is this? Can you elaborate?
It must have to do with the fact that D
On Friday, 30 September 2022 at 21:11:48 UTC, solidstate1991
wrote:
Let's say I have a class or an interface with a function, and I
want to pass that to a template to generate another function
(in this case one that passes it to a scripting engine, and
allows it to be called from there).
Let's say I have a class or an interface with a function, and I
want to pass that to a template to generate another function (in
this case one that passes it to a scripting engine, and allows it
to be called from there).
Currently I have the following issues:
1. I have to pass the
On Friday, 30 September 2022 at 16:23:00 UTC, mw wrote:
On Friday, 30 September 2022 at 15:57:22 UTC, Quirin Schroll
wrote:
When I do `new void[](n)`, is that buffer allocated with an
alignment of 1 or what are the guarantees? How can I set an
alignment? Also, is the alignment of any type
On Friday, 30 September 2022 at 15:57:22 UTC, Quirin Schroll
wrote:
When I do `new void[](n)`, is that buffer allocated with an
alignment of 1 or what are the guarantees? How can I set an
alignment? Also, is the alignment of any type guaranteed to be
a power of 2?
When I do `new void[](n)`, is that buffer allocated with an
alignment of 1 or what are the guarantees? How can I set an
alignment? Also, is the alignment of any type guaranteed to be a
power of 2?
Dear Dlang experts,
up until now I was perfectly happy with implementing `(override)
string toString() const` or something to get nicely formatted
(mostly debug) output for my structs, classes and exceptions.
But recently I stumbled upon
On Friday, 30 September 2022 at 00:18:42 UTC, Ruby The Roobster
wrote:
On Thursday, 29 September 2022 at 16:07:59 UTC, mw wrote:
On Thursday, 29 September 2022 at 16:02:43 UTC, Ruby The
Roobster wrote:
Is there any way one can interface with Rust, such as with a
struct, or a function?
I know
15 matches
Mail list logo