Skip to content

Commit

Permalink
Allowed for extra type parameters in ShiftVector varargs constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
brainandforce committed Dec 10, 2023
1 parent 21a8493 commit 01e89ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vectors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ end

ShiftVector{S}(::StaticArray, wt::Real = true) where S = array_not_flattened()
ShiftVector{S}(t::Tuple, wt::Real = true) where S = ShiftVector{S}(SVector(t), wt)
ShiftVector{S}(x::Real...; weight::Real = true) where S = ShiftVector{S}(SVector(x), weight)

(T::Type{<:ShiftVector{<:BySpace}})(x::Real...; weight::Real = true) = T(SVector(x), weight)

ShiftVector{S,D}(t::Tuple, wt::Real = true) where {S,D} = ShiftVector{S}(SVector{D}(t), wt)
ShiftVector{S,D}(v::StaticArray, wt::Real = true) where {S,D} = ShiftVector{S}(SVector{D}(v), wt)
Expand Down

0 comments on commit 01e89ff

Please sign in to comment.