On Mon, 30 May 2011 09:42:53 -0400, Johann MacDonagh
johann.macdonagh@spam..gmail.com wrote:
I'm wondering if there's a cleaner way to do this:
class Test(T = uint)
{
this(string s)
{
}
}
void main(string[] argv)
{
auto a = new Test!()(test);
}
I'd *like* to be able
On 2011-05-31 10:49, Steven Schveighoffer wrote:
On Mon, 30 May 2011 09:42:53 -0400, Johann MacDonagh
johann.macdonagh@spam..gmail.com wrote:
I'm wondering if there's a cleaner way to do this:
class Test(T = uint)
{
this(string s)
{
}
}
void main(string[] argv)
On Tue, 31 May 2011 19:49:24 +0200, Steven Schveighoffer
schvei...@yahoo.com wrote:
Currently, you can omit the template args only in the case of IFTI
(Implicit Function Template Instantiation) which actually deduces your
template arguments based on the function call.
I'd argue actually,
I'm wondering if there's a cleaner way to do this:
class Test(T = uint)
{
this(string s)
{
}
}
void main(string[] argv)
{
auto a = new Test!()(test);
}
I'd *like* to be able to do this:
auto a = new Test(test);
and:
auto a = new Test!double(test);
The only possibility I see
On 2011-05-30 15:42, Johann MacDonagh wrote:
I'm wondering if there's a cleaner way to do this:
class Test(T = uint)
{
this(string s)
{
}
}
void main(string[] argv)
{
auto a = new Test!()(test);
}
I'd *like* to be able to do this:
auto a = new Test(test);
and:
auto a = new
On 5/30/2011 10:12 AM, Jacob Carlborg wrote:
If you want to use the default parameter I think you have to do this:
auto a = new Test!()(test);
Yeah, that's the best I could come up with too :( I suppose users can
alias it if necessary. Thanks!
On 2011-05-30 06:42, Johann MacDonagh wrote:
I'm wondering if there's a cleaner way to do this:
class Test(T = uint)
{
this(string s)
{
}
}
void main(string[] argv)
{
auto a = new Test!()(test);
}
I'd *like* to be able to do this:
auto a = new Test(test);