|
66 | 66 |
|
67 | 67 |
|
68 | 68 | function unit(::Type{T}, i::Integer) where T <: StaticVector
|
69 |
| - T(ntuple(Val{length(T)}) do j |
| 69 | + T(ntuple(Val(length(T))) do j |
70 | 70 | ifelse(i == j, 1, 0)
|
71 | 71 | end)
|
72 | 72 | end
|
@@ -111,20 +111,20 @@ macro fixed_vector(name, parent)
|
111 | 111 | # Array constructor
|
112 | 112 | @inline function (::Type{$(name){S}})(x::AbstractVector{T}) where {S, T}
|
113 | 113 | @assert S <= length(x)
|
114 |
| - $(name){S, T}(ntuple(i-> x[i], Val{S}())) |
| 114 | + $(name){S, T}(ntuple(i-> x[i], Val(S))) |
115 | 115 | end
|
116 | 116 | @inline function (::Type{$(name){S, T1}})(x::AbstractVector{T2}) where {S, T1, T2}
|
117 | 117 | @assert S <= length(x)
|
118 |
| - $(name){S, T1}(ntuple(i-> T1(x[i]), Val{S}())) |
| 118 | + $(name){S, T1}(ntuple(i-> T1(x[i]), Val(S))) |
119 | 119 | end
|
120 | 120 |
|
121 | 121 | @inline function (::Type{$(name){S, T}})(x) where {S, T}
|
122 |
| - $(name){S, T}(ntuple(i-> T(x), Val{S}())) |
| 122 | + $(name){S, T}(ntuple(i-> T(x), Val(S))) |
123 | 123 | end
|
124 | 124 |
|
125 | 125 |
|
126 | 126 | @inline function (::Type{$(name){S}})(x::T) where {S, T}
|
127 |
| - $(name){S, T}(ntuple(i-> x, Val{S}())) |
| 127 | + $(name){S, T}(ntuple(i-> x, Val(S))) |
128 | 128 | end
|
129 | 129 | @inline function (::Type{$(name){1, T}})(x::T) where T
|
130 | 130 | $(name){1, T}((x,))
|
|
0 commit comments