On Wednesday, 24 January 2018 at 02:01:54 UTC, Jonathan M Davis
wrote:
(so there's no need to dereference the pointer to call it)
It used to check this pointer with an assert. When did it change?
I have a question on usage of BitFlags, described here:
https://dlang.org/library/std/typecons/bit_flags.html
and/or on bitop
https://dlang.org/phobos/core_bitop.html#.bsf
A similar example to the bit flags example is given here:
[code]
import std.typecons;
enum Rs : ubyte
{
None,
On Thursday, January 25, 2018 10:17:34 Kagamin via Digitalmars-d-learn
wrote:
> On Wednesday, 24 January 2018 at 02:01:54 UTC, Jonathan M Davis
>
> wrote:
> > (so there's no need to dereference the pointer to call it)
>
> It used to check this pointer with an assert. When did it change?
Actually,
On Thursday, 25 January 2018 at 10:17:34 UTC, Kagamin wrote:
On Wednesday, 24 January 2018 at 02:01:54 UTC, Jonathan M Davis
wrote:
(so there's no need to dereference the pointer to call it)
It used to check this pointer with an assert. When did it
change?
Fortunately, I have some compilers
On Thursday, 25 January 2018 at 12:06:07 UTC, Jonathan M Davis
wrote:
On Thursday, January 25, 2018 10:17:34 Kagamin via
Digitalmars-d-learn wrote:
On Wednesday, 24 January 2018 at 02:01:54 UTC, Jonathan M Davis
wrote:
> (so there's no need to dereference the pointer to call it)
It used to che
On Thursday, 25 January 2018 at 12:06:07 UTC, Jonathan M Davis
wrote:
Actually, assert on a pointer to a struct or a reference to a
class checks for null _and_ calls the invariant, and that
hasn't changed. But you have to actually assert the pointer or
reference if you want to do that, and the
On Thursday, January 25, 2018 12:38:25 Kagamin via Digitalmars-d-learn
wrote:
> On Thursday, 25 January 2018 at 12:06:07 UTC, Jonathan M Davis
>
> wrote:
> > Actually, assert on a pointer to a struct or a reference to a
> > class checks for null _and_ calls the invariant, and that
> > hasn't chang
See https://ideone.com/VZ97dh
On Thursday, January 25, 2018 12:42:57 Kagamin via Digitalmars-d-learn
wrote:
> See https://ideone.com/VZ97dh
I don't know what's going on there. Such an assertion does not seem in line
with what Walter has typically said on the subject.
Thinking about it, I do vaguely recall a discussion someti
On 01/25/2018 03:50 AM, Alex wrote:
r |= cast(BitFlags!Rs)val; // line 20 ... from asignment
r |= BitFlags!Rs(cast(Rs)val);
Ali
On Thursday, 25 January 2018 at 13:05:07 UTC, Ali Çehreli wrote:
On 01/25/2018 03:50 AM, Alex wrote:
r |= cast(BitFlags!Rs)val; // line 20 ... from
asignment
r |= BitFlags!Rs(cast(Rs)val);
Ali
Thanks :)
On Thursday, 25 January 2018 at 12:58:12 UTC, Jonathan M Davis
wrote:
Thinking about it, I do vaguely recall a discussion sometime
last year about an invariant being invisibly inserted under
some set of circumstances. Maybe that's what's happening? I
believe that it was complained about in th
On 1/25/18 8:24 AM, Mike Parker wrote:
On Thursday, 25 January 2018 at 12:58:12 UTC, Jonathan M Davis wrote:
Thinking about it, I do vaguely recall a discussion sometime last year
about an invariant being invisibly inserted under some set of
circumstances. Maybe that's what's happening? I beli
I decided it's time to learn how std traits work. I still find
the whole compile time business a bit weird to deal with, so I
decided to write a simple JSON serializer for struct that loops
over member fields and outputs them.
import std.stdio;
import std.json;
import std.traits;
struct TestS
On 01/25/2018 11:49 AM, JN wrote:
foreach (i, member; FieldNameTuple!T)
{
if (!hasUDA!(member, "noserialize"))
{
writeln(member);
}
'member' is a string local variable, which does not have that UDA. You
need to get the
On Thursday, 25 January 2018 at 19:49:05 UTC, JN wrote:
if (!hasUDA!(member, "noserialize"))
Nevermind, I get it now, member is only the field name, not a
'reference', changed it to:
if (!hasUDA!(mixin(T.stringof ~ "." ~ member), "noserialize"))
and works now
On Wednesday, 24 January 2018 at 21:48:21 UTC, Nordlöw wrote:
Why is the memory overhead for a class instance as high as 3
words (24 bytes on 64-bit systems? I find that annoyingly much
for my knowledge database application. I'm aware of
extern(C++), having one word overhead, but such
extern(C
Hi,
I need to send multipart form data using curl. Until now I build
the message body myself according to the HTML RFC but it is
getting complex with large files causing Out Of Memory Exceptions.
Low level curl supports multipart form data and I think I copied
the C headers accordingly. The
18 matches
Mail list logo