Skip to content

Commit

Permalink
Add @static to compile out if else VERSIONing
Browse files Browse the repository at this point in the history
  • Loading branch information
musm committed Nov 9, 2017
1 parent c9dcd2e commit 6638284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/priv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ end
end

@inline function ldexp3k(x::T, e::Int) where {T<:Union{Float32,Float64}}
if VERSION < v"0.7.0-DEV.1430"
@static if VERSION < v"0.7.0-DEV.1430"
reinterpret(T, reinterpret(Unsigned, x) + (Int64(e) << significand_bits(T)) % fpinttype(T))
else
reinterpret(T, reinterpret(Unsigned, x) + (Int64(e) << significand_bits(T)) % uinttype(T))
Expand Down

0 comments on commit 6638284

Please sign in to comment.