Re: Using TreeSet and __gshared values

2014-09-04 Thread via Digitalmars-d-learn
On Wednesday, 3 September 2014 at 20:10:51 UTC, ketmar via Digitalmars-d-learn wrote: On Wed, 03 Sep 2014 19:53:15 + nrgyzer via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: __gshared class members are effectively static, i.e. they are class members, not instance

Re: Using TreeSet and __gshared values

2014-09-04 Thread ketmar via Digitalmars-d-learn
On Thu, 04 Sep 2014 08:38:50 + via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Hmm... would be nice if there were a warning/error when __gshared is used without static in a class. would you fill enhancement request in bugzilla? signature.asc Description: PGP signature

Re: Using TreeSet and __gshared values

2014-09-04 Thread via Digitalmars-d-learn
On Thursday, 4 September 2014 at 09:02:26 UTC, ketmar via Digitalmars-d-learn wrote: On Thu, 04 Sep 2014 08:38:50 + via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Hmm... would be nice if there were a warning/error when __gshared is used without static in a class. would

Using TreeSet and __gshared values

2014-09-03 Thread nrgyzer via Digitalmars-d-learn
Hi guys, I'm having some trouble using the treeset implementation of Steven (dcollections) in conjunction with __gshared. When I do the following: class Entry { int value; this(int v) { value = v; } int opCmp(Object o) {

Re: Using TreeSet and __gshared values

2014-09-03 Thread ketmar via Digitalmars-d-learn
On Wed, 03 Sep 2014 19:53:15 + nrgyzer via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: __gshared class members are effectively static, i.e. they are class members, not instance members. i.e. class Entry { __gshared int value; ... static int getValue () { return value;