On Wed, 29 Dec 2010 19:25:05 -0500, %u e...@ee.com wrote:
Is it not possible to have a type type?
In compile time, you can have type parameters with ease using templates.
During runtime, you can use the TypeInfo object, which is accessed via
typeid:
auto ti = typeid(int); // ti is
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Thu, 23 Dec 2010 17:28:49 -0500, %u e...@ee.com wrote:
Should have been this:
void func(type t){
new t();
}
void func(T)(){
new T();
}
When you are passing types into functions, use templates.
-Steve
The
On Wed, 29 Dec 2010 10:33:21 -0500, %u e...@ee.com wrote:
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Thu, 23 Dec 2010 17:28:49 -0500, %u e...@ee.com wrote:
Should have been this:
void func(type t){
new t();
}
void func(T)(){
new T();
}
When you are passing
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Wed, 29 Dec 2010 10:33:21 -0500, %u e...@ee.com wrote:
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Thu, 23 Dec 2010 17:28:49 -0500, %u e...@ee.com wrote:
Should have been this:
void
Is it not possible to have a type type?
On Thu, 23 Dec 2010 17:28:49 -0500, %u e...@ee.com wrote:
Should have been this:
void func(type t){
new t();
}
void func(T)(){
new T();
}
When you are passing types into functions, use templates.
-Steve
%u:
Hiding in Object.. interesting :)
But this has strong limitations. For this problem templates are usually used.
Bye,
bearophile
Should have been this:
void func(type t){
new t();
}