Simen kjaeraas wrote:
struct bar( T ) {
auto baz( U )( U arg ) {
bar!( typeof( this ) ) tmp;
return tmp;
}
}
void main( ) {
bar!int n;
n.baz( 3 );
}
This code fails with
Error: recursive template expansion for template argument bar!(int)
Now, I agree it is recurs
On 04.08.2010 11:34, Jonathan M Davis wrote:
>
> There appears to be a bug with regards to SwapStrategy.stable. If you don't
> pass
> it a swap strategy it works just fine, but if you do, it fails.
>
> I'm using svn snapshot 1751 of phobos, which is a few weeks old, and it fails
> an
> assert
On Thursday 05 August 2010 01:26:32 Johannes Pfau wrote:
> On 04.08.2010 11:34, Jonathan M Davis wrote:
> > There appears to be a bug with regards to SwapStrategy.stable. If you
> > don't pass it a swap strategy it works just fine, but if you do, it
> > fails.
> >
> > I'm using svn snapshot 1751 o
On 05.08.2010 11:28, Jonathan M Davis wrote:
> On Thursday 05 August 2010 01:26:32 Johannes Pfau wrote:
>> On 04.08.2010 11:34, Jonathan M Davis wrote:
>>> There appears to be a bug with regards to SwapStrategy.stable. If you
>>> don't pass it a swap strategy it works just fine, but if you do, it
>
Philippe Sigaud:
> I used to be confronted to this pb too. Here is what I did:
> ...
You are gentle and helpful, and your post has given me useful ideas, but your
post it too much unreadable for me.
If you take a look here you can see 16 attaches, and it seems part of your
message are missing,
On Thursday 05 August 2010 03:23:54 Johannes Pfau wrote:
> OK I reported it, thanks for your help.
> http://d.puremagic.com/issues/show_bug.cgi?id=4584
>
> Btw: it also asserts in phobos for me. I just never saw the assert
> because my distributions package now has -release in the default
> dmd.co
bearophile Wrote:
> Philippe Sigaud:
>
> > I used to be confronted to this pb too. Here is what I did:
> > ...
>
> You are gentle and helpful, and your post has given me useful ideas, but your
> post it too much unreadable for me.
>
> If you take a look here you can see 16 attaches, and it see
Just tell me if this is frowned upon... The reason I posted on SO is
because I think it can help making people aware of D.
http://stackoverflow.com/questions/3416657/is-it-bad-practice-to-alter-dynamic-arrays-that-have-references-to-them
Let me know if it's not accepted to crosspost like this.
On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo
wrote:
Just tell me if this is frowned upon... The reason I posted on SO is
because I think it can help making people aware of D.
http://stackoverflow.com/questions/3416657/is-it-bad-practice-to-alter-dynamic-arrays-that-have-references-to-them
Suppose I have a base class with many ctors().
I want to inherit from the base class and make one slight alteration to it,
but I don't want to write X times the following:
this(args) {
super(args);
}
Does D have an easy way for the derived class to 'inherit' all or some of the
base class ctors
OK, let's try again.
I used to be confronted to this pb too. Here is what I did:
/**
Alias itself to true if T is an instance of templ. To obtain the template
parameters,
see TemplateParametersTypeTuple.
Example:
auto cy = cycle([0,1,2,3]); // cy is a Cycle!(int[])
alias typeof(cy) Cy;
asse
On Thu, 05 Aug 2010 13:53:20 -0400, dcoder wrote:
Suppose I have a base class with many ctors().
I want to inherit from the base class and make one slight alteration to
it,
but I don't want to write X times the following:
this(args) {
super(args);
}
Does D have an easy way for the deriv
On 05.08.2010 19:35, Steven Schveighoffer wrote:
On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo
wrote:
(...)
One helpful function to note is the capacity function:
http://digitalmars.com/d/2.0/phobos/object.html#capacity
This gives you the capacity of the array, or the largest length it can
On Thu, 05 Aug 2010 14:41:12 -0400, simendsjo
wrote:
On 05.08.2010 19:35, Steven Schveighoffer wrote:
On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo
wrote:
(...)
One helpful function to note is the capacity function:
http://digitalmars.com/d/2.0/phobos/object.html#capacity
This gives yo
On 05.08.2010 20:50, Steven Schveighoffer wrote:
On Thu, 05 Aug 2010 14:41:12 -0400, simendsjo
wrote:
On 05.08.2010 19:35, Steven Schveighoffer wrote:
On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo
wrote:
(...)
(...)
Ah, that's really good to know! So I can see if it will reallocate usin
On Thu, 05 Aug 2010 15:23:13 -0400, simendsjo
wrote:
On 05.08.2010 20:50, Steven Schveighoffer wrote:
On Thu, 05 Aug 2010 14:41:12 -0400, simendsjo
wrote:
On 05.08.2010 19:35, Steven Schveighoffer wrote:
On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo
wrote:
(...)
(...)
Ah, that's rea
Philippe Sigaud:
> I used to be confronted to this pb too. Here is what I did:
Thank you for all your code :)
Bye,
bearophile
dcoder wrote:
Suppose I have a base class with many ctors().
I want to inherit from the base class and make one slight alteration to
it,
but I don't want to write X times the following:
this(args) {
super(args);
}
Does D have an easy way for the derived class to 'inherit' all or some
Steven Schveighoffer Wrote:
> On Thu, 05 Aug 2010 13:53:20 -0400, dcoder wrote:
>
> > Suppose I have a base class with many ctors().
> >
> > I want to inherit from the base class and make one slight alteration to
> > it,
> > but I don't want to write X times the following:
> >
> > this(args) {
19 matches
Mail list logo