I want to create a mixin template such that:
mixin template ArgNull(alias arg, string name)
{
if(arg is null)
throw new Exception(name~ cannot be null.);
}
But is there a way to do that with only one template argument.
And then use it like:
string text = null;
mixin
On Friday, 2 August 2013 at 11:37:27 UTC, Bosak wrote:
I want to create a mixin template such that:
mixin template ArgNull(alias arg, string name)
{
if(arg is null)
throw new Exception(name~ cannot be null.);
}
But is there a way to do that with only one template argument.
And
On Friday, 2 August 2013 at 11:50:05 UTC, Bosak wrote:
On Friday, 2 August 2013 at 11:37:27 UTC, Bosak wrote:
I want to create a mixin template such that:
mixin template ArgNull(alias arg, string name)
{
if(arg is null)
throw new Exception(name~ cannot be null.);
}
But is there a
On Friday, 2 August 2013 at 11:48:32 UTC, Andrej Mitrovic wrote:
On Friday, 2 August 2013 at 11:37:27 UTC, Bosak wrote:
I want to create a mixin template such that:
mixin template ArgNull(alias arg, string name)
{
if(arg is null)
throw new Exception(name~ cannot be null.);
}
But is
On Friday, 2 August 2013 at 12:10:00 UTC, Bosak wrote:
On Friday, 2 August 2013 at 11:52:32 UTC, monarch_dodra wrote:
On Friday, 2 August 2013 at 11:37:27 UTC, Bosak wrote:
I want to create a mixin template such that:
mixin template ArgNull(alias arg, string name)
{
if(arg is null)
On Friday, 2 August 2013 at 12:17:12 UTC, Bosak wrote:
On Friday, 2 August 2013 at 12:10:00 UTC, Bosak wrote:
On Friday, 2 August 2013 at 11:52:32 UTC, monarch_dodra wrote:
On Friday, 2 August 2013 at 11:37:27 UTC, Bosak wrote:
I want to create a mixin template such that:
mixin template
On Friday, 2 August 2013 at 12:47:51 UTC, monarch_dodra wrote:
On Friday, 2 August 2013 at 12:17:12 UTC, Bosak wrote:
On Friday, 2 August 2013 at 12:10:00 UTC, Bosak wrote:
On Friday, 2 August 2013 at 11:52:32 UTC, monarch_dodra wrote:
On Friday, 2 August 2013 at 11:37:27 UTC, Bosak wrote:
I