Tim Matthews wrote:
I think this would be less ugly:
template vers(char[] V)
{
mixin("version(" ~ V ~ ")
{
const bool vers = true;
}
else
{
const bool vers = false;
}");
}
static if(vers!("BackendFoo") || vers!("Windows"))
{
//
}
else static if(vers!("BackendBar"))
{
//
}
else static if (vers!("BackendCar"))
{
//
}
else
{
//
}
I would prefer the normal version statement to work like that directly
though.
This still doesn't solve my problem though, all it does is remove the
usage of the version statement, which seems... pointless :S