Re: Reset all Members of a Aggregate Instance

2015-12-07 Thread Daniel Murphy via Digitalmars-d-learn
On 4/12/2015 8:38 AM, Chris Wright wrote: An object reference is just a pointer, but we can't directly cast it. So we make a pointer to it and cast that; the type system allows it. Now we can access the data that the object reference refers to directly. Casting is fine too: cast(void*)classRef

Re: Can someone check this on win32 ?

2015-12-01 Thread Daniel Murphy via Digitalmars-d-learn
On 21/11/2015 10:46 PM, BBaz wrote: Seems to be fixed: __ import std.math; void main() {real function(real) c = } __ https://issues.dlang.org/show_bug.cgi?id=4541 At least it works on linux x86_64. It works because of

Re: Something about Chinese Disorder Code

2015-12-01 Thread Daniel Murphy via Digitalmars-d-learn
On 25/11/2015 2:16 PM, Rikki Cattermole wrote: On 25/11/15 1:47 AM, Meta wrote: I'm pretty sure you can just do: wstring text = "my string"; Or auto text = "my string"w; The second one is correct yes. I'm just assuming that it isn't compiled into the executable. Either is fine.

Re: Purity of std.conv.to!string

2015-09-27 Thread Daniel Murphy via Digitalmars-d-learn
On 27/09/2015 3:14 AM, cym13 wrote: On Saturday, 26 September 2015 at 17:08:00 UTC, Nordlöw wrote: Why is the following code not pure: float x = 3.14; import std.conv : to; auto y = x.to!string; ??? Is there a reason for it not being pure? If not, this is a serious problem as

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Daniel Murphy via Digitalmars-d-learn
Brian Schott wrote in message news:pbfgiwaxsdxdxetpi...@forum.dlang.org... The delete keyword is deprecated[1] and making that decision never broke any code. [1] http://dlang.org/deprecate.html#delete If you look at the table up the top, delete hasn't actually been deprecated yet. If

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Daniel Murphy via Digitalmars-d-learn
Jonathan M Davis wrote in message news:xjmfhegvanqdivhbt...@forum.dlang.org... AFAIK, the only reason that it's not deprecated is that no one has bothered to make the change (and you didn't want to deprecate it when you went through all of those and updated their status a while back).

Re: Building 32bit program with MSVC?

2014-05-31 Thread Daniel Murphy via Digitalmars-d-learn
Jonathan M Davis via Digitalmars-d-learn wrote in message news:mailman.1421.1401576730.2907.digitalmars-d-le...@puremagic.com... By dynamic linking do you mean LoadLibrary or linking with import library? Both will work, otherwise we couldn't use Microsoft's libraries - e.g.

Re: Any chance to avoid monitor field in my class?

2014-05-16 Thread Daniel Murphy via Digitalmars-d-learn
Yuriy wrote in message news:klosrzuxwmvilupzz...@forum.dlang.org... Ok, i can understand that, but what about this one: http://dpaste.dzfl.pl/6a9961e32e6d It doesn't use d arrays in function interfaces. Should it work? Similar problem, D arrays cannot be mangled correctly with C++ mangling.

Re: Any chance to avoid monitor field in my class?

2014-05-15 Thread Daniel Murphy via Digitalmars-d-learn
Yuriy wrote in message news:rfirqtgbparjbqxwt...@forum.dlang.org... On Wednesday, 14 May 2014 at 08:47:38 UTC, Daniel Murphy wrote: I'm not getting any errors with the development head. What os/compiler version? Hm, now that's strange. Building with latest public version seems to work.

Re: Any chance to avoid monitor field in my class?

2014-05-14 Thread Daniel Murphy via Digitalmars-d-learn
On Tuesday, 13 May 2014 at 17:41:42 UTC, Yuriy wrote: On Tuesday, 13 May 2014 at 17:09:01 UTC, Daniel Murphy wrote: What exactly is the mangling problem with extern(C++) classes? Can't use D arrays (and strings) as function argument types. Can't use D array types as template arguments. extern

Re: Any chance to avoid monitor field in my class?

2014-05-13 Thread Daniel Murphy via Digitalmars-d-learn
Yuriy wrote in message news:uflaemdlxvavfmvkb...@forum.dlang.org... Hello, is there a way of reducing size of an empty class to just vtbl? I tried to declare it as extern(C++) which works, but has a nasty side effect of limited mangling. What exactly is the mangling problem with extern(C++)