Sam Hu wrote:
From std.range:
enum StoppingPolicy
{
/// Stop when the shortest range is exhausted
shortest,
/// Stop when the longest range is exhausted
longest,
/// Require that all ranges are equal
requireSameLength,
}
From std.thread:( phobos webpage)
enum State;
A
bearophile wrote:
I don't know much C++. Can CRTP be used in D1 too, to improve the performance
of some D1 code?
http://en.wikipedia.org/wiki/Curiously_Recurring_Template_Pattern
Why don't you just go and try?
If you hit forward referencing errors when using structs, try classes
with final
bearophile wrote:
I don't know much C++. Can CRTP be used in D1 too, to improve the performance
of some D1 code?
http://en.wikipedia.org/wiki/Curiously_Recurring_Template_Pattern
Bye,
bearophile
We have this, except we call it template mixin :)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
downs wrote:
bearophile wrote:
I don't know much C++. Can CRTP be used in D1 too, to improve the
performance of some D1 code?
http://en.wikipedia.org/wiki/Curiously_Recurring_Template_Pattern
Bye,
bearophile
We have this, except we call it
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Bill Baxter wrote:
On Wed, Aug 19, 2009 at 10:32 AM, div0d...@users.sourceforge.net wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
downs wrote:
bearophile wrote:
I don't know much C++. Can CRTP be used in D1 too, to improve the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Bill Baxter wrote:
On Wed, Aug 19, 2009 at 10:32 AM, div0d...@users.sourceforge.net wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
downs wrote:
bearophile wrote:
I don't know much C++. Can CRTP be used in D1 too, to improve the
div0:
Mixins do pretty much same thing but in reverse, mixins pull stuff right
into the class, and with a mixin it's the class which is imposing the
meta interface on the mixin.
As you pointed out though, CRTP nukes your inheritance slot in D, so
you'd generally prefer mixins in D. CRTP
Mixins can be used to do a lot (most? all?) of things CRTP is used for:
class Class(alias MixMe)
{
mixin MixMe impl;
...
void doSomething {
impl.doIt();
}
}
where can I read about class parameters?
On Wed, Aug 19, 2009 at 2:59 PM, Saaaem...@needmail.com wrote:
Mixins can be used to do a lot (most? all?) of things CRTP is used for:
class Class(alias MixMe)
{
mixin MixMe impl;
...
void doSomething {
impl.doIt();
}
}
where can I read about class parameters?
It's