We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e98f5b3 commit daa194fCopy full SHA for daa194f
src/SOneTo.jl
@@ -6,12 +6,8 @@ a `StaticArray`.
6
"""
7
SOneTo
8
9
-if isdefined(Base, :AbstractOneTo)
10
- struct SOneTo{n} <: Base.AbstractOneTo{Int}
11
- end
12
-else
13
- struct SOneTo{n} <: AbstractUnitRange{Int}
14
+const SOneToSupertype = isdefined(Base, :AbstractOneTo) ? Base.AbstractOneTo : AbstractUnitRange
+struct SOneTo{n} <: SOneToSupertype{Int}
15
end
16
17
SOneTo(n::Int) = SOneTo{n}()
0 commit comments