www.digitalmars.com         C & C++   DMDScript  

D - Template Alias

reply Matthias Becker <Matthias_member pathlink.com> writes:
Seems like I'm stupid. I read the manual, but I didn't get it.

Here a short sensles C++ code using template-templates. Could you pleas
transform it to D, so I get it?

tempalte <typename T>
class Wahtever {
T foo;
}


template <template <typename T> class U>
class Bar {
// ...
U<int> baz;
};

Bar<Whatever>
Jan 14 2004
next sibling parent reply Matthias Becker <Matthias_member pathlink.com> writes:
Extesion:

tempalte <typename T>
class Wahtever {
T foo;
}


template <template <typename T> class U>
class Bar {
U<int> baz;
T quer;
};

Bar<Whatever>
Jan 14 2004
next sibling parent J Anderson <REMOVEanderson badmama.com.au> writes:
Matthias Becker wrote:

Extesion:

tempalte <typename T>
class Wahtever {
T foo;
}


template <template <typename T> class U>
class Bar {
U<int> baz;
T quer;
};

Bar<Whatever>




  
template Whatever(T) //namespace { class Whatever { T foo; } } template Bar(alias UT, T) //namespace { alias UT!(T) U; class Bar { U baz; T quer; } } alias Bar!(Whatever, int) BarAlias; int main ( char [] [] args ) { BarAlias.Bar obj = new BarAlias.Bar; obj.baz.foo = 10; //Set foo return 1; } That probably could be cleaned up a bit.
Jan 14 2004
prev sibling parent reply Matthias Becker <Matthias_member pathlink.com> writes:
Why do you write using my name? This extension wasn't me. Sorry guys.
Jan 15 2004
parent reply imr1984 <imr1984_member pathlink.com> writes:
In article <bu5hjp$156u$1 digitaldaemon.com>, Matthias Becker says...
Why do you write using my name? This extension wasn't me. Sorry guys.
I think its time to leave this crappy forum that takes 5 minutes to update itself, and move to a proper one with registering.
Jan 15 2004
parent reply "Matthew" <matthew.hat stlsoft.dot.org> writes:
"imr1984" <imr1984_member pathlink.com> wrote in message
news:bu5md0$1dil$1 digitaldaemon.com...
 In article <bu5hjp$156u$1 digitaldaemon.com>, Matthias Becker says...
Why do you write using my name? This extension wasn't me. Sorry guys.
I think its time to leave this crappy forum that takes 5 minutes to update itself, and move to a proper one with registering.
You're living in a dream world, lad. It takes about 2 seconds to update, and that's from Australia.
Jan 15 2004
parent reply "Andrew Edwards" <edwardsac spamfreeusa.com> writes:
"Matthew" <matthew.hat stlsoft.dot.org> wrote in message
news:bu5n22$1emf$1 digitaldaemon.com...
 "imr1984" <imr1984_member pathlink.com> wrote in message
 news:bu5md0$1dil$1 digitaldaemon.com...
 In article <bu5hjp$156u$1 digitaldaemon.com>, Matthias Becker says...
Why do you write using my name? This extension wasn't me. Sorry guys.
I think its time to leave this crappy forum that takes 5 minutes to
update
 itself, and move to a proper one with registering.
You're living in a dream world, lad. It takes about 2 seconds to update,
and
 that's from Australia.
He's talking about the web interface. It takes roughly 5 minutes to update and that's just a few miles down the road.
Jan 15 2004
parent reply "Matthew" <matthew.hat stlsoft.dot.org> writes:
"Andrew Edwards" <edwardsac spamfreeusa.com> wrote in message
news:bu5r21$1kmc$1 digitaldaemon.com...
 "Matthew" <matthew.hat stlsoft.dot.org> wrote in message
 news:bu5n22$1emf$1 digitaldaemon.com...
 "imr1984" <imr1984_member pathlink.com> wrote in message
 news:bu5md0$1dil$1 digitaldaemon.com...
 In article <bu5hjp$156u$1 digitaldaemon.com>, Matthias Becker says...
Why do you write using my name? This extension wasn't me. Sorry guys.
I think its time to leave this crappy forum that takes 5 minutes to
update
 itself, and move to a proper one with registering.
You're living in a dream world, lad. It takes about 2 seconds to update,
and
 that's from Australia.
He's talking about the web interface. It takes roughly 5 minutes to update and that's just a few miles down the road.
Ah! That explains the issue, if not the presentation ... Since dm provides its own news server, why not use that direct? Please explain ...
Jan 15 2004
parent reply Lewis <dethbomb hotmail.com> writes:
Matthew wrote:

 "Andrew Edwards" <edwardsac spamfreeusa.com> wrote in message
 news:bu5r21$1kmc$1 digitaldaemon.com...
 
"Matthew" <matthew.hat stlsoft.dot.org> wrote in message
news:bu5n22$1emf$1 digitaldaemon.com...

"imr1984" <imr1984_member pathlink.com> wrote in message
news:bu5md0$1dil$1 digitaldaemon.com...

In article <bu5hjp$156u$1 digitaldaemon.com>, Matthias Becker says...

Why do you write using my name? This extension wasn't me. Sorry guys.
I think its time to leave this crappy forum that takes 5 minutes to
update
itself, and move to a proper one with registering.
You're living in a dream world, lad. It takes about 2 seconds to update,
and
that's from Australia.
He's talking about the web interface. It takes roughly 5 minutes to update and that's just a few miles down the road.
Ah! That explains the issue, if not the presentation ... Since dm provides its own news server, why not use that direct? Please explain ...
I used the web interface for a while, it is less than desirable... I have since started using the free mozilla newsreader (that everyone should have installed anyway, i love mozilla!) i can honestly say that it has never errored or glitched, and works perfectly. On good caveat is you can also delete messages you make by mistake from it, and you can instantly update all messages from it also, i highly recommend using it... regards Lewis
Jan 15 2004
parent Brad Anderson <brad sankaty.dot.com> writes:
Lewis is correct.  Mozilla Thunderbird has easily been the best 
experience viewing newsgroups.

Find it at:
http://mozilla.org/products/thunderbird/

BA


Lewis wrote:

 Matthew wrote:
 
 "Andrew Edwards" <edwardsac spamfreeusa.com> wrote in message
 news:bu5r21$1kmc$1 digitaldaemon.com...

 "Matthew" <matthew.hat stlsoft.dot.org> wrote in message
 news:bu5n22$1emf$1 digitaldaemon.com...

 "imr1984" <imr1984_member pathlink.com> wrote in message
 news:bu5md0$1dil$1 digitaldaemon.com...

 In article <bu5hjp$156u$1 digitaldaemon.com>, Matthias Becker says...

 Why do you write using my name? This extension wasn't me. Sorry guys.
I think its time to leave this crappy forum that takes 5 minutes to
update
 itself, and move to a proper one with registering.
You're living in a dream world, lad. It takes about 2 seconds to update,
and
 that's from Australia.
He's talking about the web interface. It takes roughly 5 minutes to update and that's just a few miles down the road.
Ah! That explains the issue, if not the presentation ... Since dm provides its own news server, why not use that direct? Please explain ...
I used the web interface for a while, it is less than desirable... I have since started using the free mozilla newsreader (that everyone should have installed anyway, i love mozilla!) i can honestly say that it has never errored or glitched, and works perfectly. On good caveat is you can also delete messages you make by mistake from it, and you can instantly update all messages from it also, i highly recommend using it... regards Lewis
Jan 15 2004
prev sibling parent "Walter" <walter digitalmars.com> writes:
"Matthias Becker" <Matthias_member pathlink.com> wrote in message
news:bu3vi9$1lvm$1 digitaldaemon.com...
 Seems like I'm stupid. I read the manual, but I didn't get it.

 Here a short sensles C++ code using template-templates. Could you pleas
 transform it to D, so I get it?

 tempalte <typename T>
 class Wahtever {
 T foo;
 }


 template <template <typename T> class U>
 class Bar {
 // ...
 U<int> baz;
 };

 Bar<Whatever>
class Whatever(T) { T foo; } class Bar(alias U) { U!(int) baz; } Bar!(Whatever)
Jan 14 2004