Steven Schveighoffer wrote:
When not in release mode, accessing an out-of-bounds element in an array
throws a RangeError. I would like to do the same thing in dcollections
when indexing, but the only tool I know of that enables throwing an
error in non-release mode is assert, and that onl
When not in release mode, accessing an out-of-bounds element in an array
throws a RangeError. I would like to do the same thing in dcollections
when indexing, but the only tool I know of that enables throwing an error
in non-release mode is assert, and that only throws an assert error.
Doe
Hello Jonathan,
On Friday, July 02, 2010 09:46:37 Rob Adelberg wrote:
I'm sure this has come up before, but I want to store something like
an std.array appender in a class. All of the examples use auto for
the type but you can't put that in a class definition, so what do you
put?
Example:
cl
Heywood Floyd wrote:
I noted that the classinfo.name-strings typically looks like this:
classtype.Foo
classtype.Bar
classtype.Cat
classtype.Dog
Doesn't this first "classtype."-part introduce overhead when these
strings are used as keys in an AA? The string co
On 02/07/2010 00:47, bearophile wrote:
BLS:
I don't understand (in this context) . Can you please elaborate a bit more ?
I have not shown you code because I don't understand your context. But you can
put inside static this() {...} code that can't be run statically, like the
initialization of
Hi, for reasons I don't completely understand I would like to implement
a BIP Buffer in D2. ;) well async IO is the use case .. I think.
How can I allocate/free buffer-space from virtual memory ?
What I am looking for is a way to do platform independent allocating of
memory from the virtual a
On Friday, July 02, 2010 09:46:37 Rob Adelberg wrote:
> I'm sure this has come up before, but I want to store something like an
> std.array appender in a class. All of the examples use auto for the type
> but you can't put that in a class definition, so what do you put?
>
> Example:
> class packe
I'm sure this has come up before, but I want to store something like an
std.array appender in a class. All of the examples use auto for the type but
you can't put that in a class definition, so what do you put?
Example:
class packet{...}
class A {
packet [] packetlist;
appender!(packet)
On Jul 2, 2010, at 15:34 , Steven Schveighoffer wrote:
> On Fri, 02 Jul 2010 09:32:39 -0400, Steven Schveighoffer
> wrote:
>
>> On Fri, 02 Jul 2010 09:24:20 -0400, Heywood Floyd wrote:
>>
>>>
>>> Good day!
>>>
>>>
>>> Consider
>>>
>>> // - - - -
>>> class Foo{}
>>> auto one = new Foo();
Hello bearophile,
Is alloca() pure?
Given the same input alloca() generally returns different pointers, so
it's not a pure function.
But the same is true for the ptr field when you allocate an array on
the heap.
And the memory allocated by alloca() never escapes the function, so it
looks more
On Fri, 02 Jul 2010 09:32:39 -0400, Steven Schveighoffer
wrote:
On Fri, 02 Jul 2010 09:24:20 -0400, Heywood Floyd
wrote:
Good day!
Consider
// - - - -
class Foo{}
auto one = new Foo();
auto two = new Foo();
writefln("one: %x two: %x", &one.classinfo, &two.classinfo);
// - - - -
For
On Fri, 02 Jul 2010 09:24:20 -0400, Heywood Floyd
wrote:
Good day!
Consider
// - - - -
class Foo{}
auto one = new Foo();
auto two = new Foo();
writefln("one: %x two: %x", &one.classinfo, &two.classinfo);
// - - - -
For me this results in two identical memory addresses "every time".
Can
Good day!
Consider
// - - - -
class Foo{}
auto one = new Foo();
auto two = new Foo();
writefln("one: %x two: %x", &one.classinfo, &two.classinfo);
// - - - -
For me this results in two identical memory addresses "every time".
Can I rely on this?
Can I design software based on the assumption
On Thu, 01 Jul 2010 18:26:06 -0400, bearophile
wrote:
Steven Schveighoffer:
I think a member initializer has to be a constant expression, like int
i =
1. Anything else has to be done in the constructor.
There are the static constructors too, for modules, structs, classes.
static const
Is alloca() pure?
Given the same input alloca() generally returns different pointers, so it's not
a pure function.
But the same is true for the ptr field when you allocate an array on the heap.
And the memory allocated by alloca() never escapes the function, so it looks
more pure than normal heap
15 matches
Mail list logo