xxxxxxxxxx
T foo(T)(T x)
in
{
static assert(is(T == int));
}
do
{
return x + 1;
}
struct Foo(T)
{
invariant
{
static assert(is(T == int));
}
T a;
this(T x)
{
a = x;
}
}
void main()
{
Foo!float x = Foo!float(1.0);
float y = 1.0;
auto z = foo(y);
}