On 2011-10-26 02:07, Davidson Corry wrote:
Either one dedicated to D (D2 specifically), or a configuration for
'indent' or some other cross-language prettyprinter?
Thanks.
The Eclipse plugin Descent has a formatter. Don't know if it works for D2.
--
/Jacob Carlborg
Anyone know a workaround to #3051 - "Passing alias to member function does
not work"? (Hopefully besides just making "fun" either static or global)
http://d.puremagic.com/issues/show_bug.cgi?id=3051
class Foo
{
void func(double) { }
void func(int) { }
void set(T)(T handler) { dg = handler; }
void delegate(int) dg;
}
void main()
{
auto foo = new Foo;
foo.set(&foo.func); // NG, func(double) is picked up first
}
Error: cannot implicitly convert expression (handler) of
Uncrustify works with D. You might want UniversalIndentGUI as a
frontend if you don't prefer commandline.
On Tue, 25 Oct 2011 17:07:31 -0700, Davidson Corry wrote:
> Either one dedicated to D (D2 specifically), or a configuration for
> 'indent' or some other cross-language prettyprinter?
>
> Thanks.
Not really. indent already mostly works, similarly vim mostly gets it
right. Visual D has something
Either one dedicated to D (D2 specifically), or a configuration for
'indent' or some other cross-language prettyprinter?
Thanks.
Jonathan M Davis:
> It operates on a range. It can't do anything else. It has no access to the
> underlying container and can't remove anything from it.
Thank you for explaining me this stuff again. I have updated the enhancement
request 6849 with a note.
Bye,
bearophile
On Tue, 25 Oct 2011 20:52:57 +0200, Timon Gehr wrote:
> On 10/25/2011 08:38 PM, Graham Fawcett wrote:
>> On Tue, 25 Oct 2011 13:11:20 -0400, bearophile wrote:
>>
>>> Dmitry Olshansky:
>>>
No, it's not a bug. It's the same as c++ STL remove - it operates on
range but not on container. To
On 10/25/2011 08:38 PM, Graham Fawcett wrote:
On Tue, 25 Oct 2011 13:11:20 -0400, bearophile wrote:
Dmitry Olshansky:
No, it's not a bug. It's the same as c++ STL remove - it operates on
range but not on container. To shrink container, update it's length.
Thank you for your answer, I didn't
simendsjo wrote:
>On 23.10.2011 14:47, Johannes Pfau wrote:
>> simendsjo wrote:
>>> I saw someone mention ZeroMQ in a subthread the other day. I
>>> watched a few videos, and it looks to me like a good fit for D. The
>>> philosophies matches pretty well: small, clean api, no bloat (only
>>> transpo
On Tue, 25 Oct 2011 13:11:20 -0400, bearophile wrote:
> Dmitry Olshansky:
>
>> No, it's not a bug. It's the same as c++ STL remove - it operates on
>> range but not on container. To shrink container, update it's length.
>
> Thank you for your answer, I didn't know this, and I didn't think about
On Tuesday, October 25, 2011 10:11 bearophile wrote:
> Dmitry Olshansky:
> > No, it's not a bug. It's the same as c++ STL remove - it operates on
> > range but not on container. To shrink container, update it's length.
>
> Thank you for your answer, I didn't know this, and I didn't think about
> t
On 25.10.2011 18:23, Dmitry Olshansky wrote:
On 25.10.2011 13:51, bearophile wrote:
maarten van damme:
import std.algorithm;
struct Loc {
uint row;
uint col;
}
void main(){
Loc[] testArray;
Loc a={3,2};
Loc b={5,3};
testArray~=a;
testArray~=b;
remove(testArray,a);
}
gives the same error
The
Dmitry Olshansky:
> No, it's not a bug. It's the same as c++ STL remove - it operates on
> range but not on container. To shrink container, update it's length.
Thank you for your answer, I didn't know this, and I didn't think about this
possibility because it's weird, it's an in-place operation
On 25.10.2011 13:51, bearophile wrote:
maarten van damme:
import std.algorithm;
struct Loc {
uint row;
uint col;
}
void main(){
Loc[] testArray;
Loc a={3,2};
Loc b={5,3};
testArray~=a;
testArray~=b;
remove(testArray,a);
}
gives the same error
The second argument of remove() needs to be an ind
thank you, meanwhile I'll just use find + remove the index.
I have written this:
http://d.puremagic.com/issues/show_bug.cgi?id=6849
Bye,
bearophile
On 25.10.2011 11:51, bearophile wrote:
maarten van damme:
import std.algorithm;
struct Loc {
uint row;
uint col;
}
void main(){
Loc[] testArray;
Loc a={3,2};
Loc b={5,3};
testArray~=a;
testArray~=b;
remove(testArray,a);
}
gives the same error
The second argument of remove() needs to be an ind
maarten van damme:
> import std.algorithm;
> struct Loc {
> uint row;
> uint col;
> }
> void main(){
> Loc[] testArray;
> Loc a={3,2};
> Loc b={5,3};
> testArray~=a;
> testArray~=b;
> remove(testArray,a);
> }
> gives the same error
The second argument of remove() needs to be an index, a size_t.
Jesse Phillips Wrote:
> RandomCover is a very useful for selecting all options of a range. But you
> must create a new generator every-time to get random behavior from sequential
> calls.
Also it's probably a big structure. Check its size.
20 matches
Mail list logo