I have a struct
struct Test
divisor::Int64
dividend::Int64
result::Float64
end
Test(divisor, dividend) = Test(divisor, dividend, divisor/dividend)
I want to make a template out of this struct such that instead Int64 the definition is like the following
struct Test2{T<:Integer}
…
end
but I don’t know what to do with result since in the optimal case for T being BigInt result should be of type BigFloat
EDIT:
the type of result should be parameterized depending on the concrete type T