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 e679776 commit b68a8a6Copy full SHA for b68a8a6
src/static.jl
@@ -4,9 +4,7 @@ A statically sized `Int`.
4
Use `Static(N)` instead of `Val(N)` when you want it to behave like a number.
5
"""
6
struct Static{N} <: Integer
7
- function Static{N}() where {N}
8
- return new{N::Int}()
9
- end
+ Static{N}() where {N} = new{N::Int}()
10
end
11
Base.@pure Static(N::Int) = Static{N}()
12
Static(N) = Static(convert(Int, N))
0 commit comments