Skip to content

Commit

Permalink
Specialize unchecked_oneto (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub authored Mar 12, 2024
1 parent 7c2b72d commit 2a1dabc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "InfiniteArrays"
uuid = "4858937d-0d70-526a-a4dd-2d5cb5dd786c"
version = "0.13.4"
version = "0.13.5"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
4 changes: 4 additions & 0 deletions src/infrange.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ function oneto(x::ComplexInfinity)
throw(ArgumentError("Cannot create infinite range with negative length"))
end

@static if VERSION >= v"1.11.0-"
Base.unchecked_oneto(::PosInfinity) = OneToInf()
end

AbstractArray{T}(a::OneToInf) where T<:Integer = OneToInf{T}()
AbstractVector{T}(a::OneToInf) where T<:Integer = OneToInf{T}()
AbstractArray{T}(a::OneToInf) where T<:Real = InfUnitRange{T}(a)
Expand Down

0 comments on commit 2a1dabc

Please sign in to comment.