Combining an SVector and an SMatrix, in a cat(2, vec, mat) style

question
array

#1

What is the best way to combine an SVector and an SMatrix, in a cat(2, vec, mat) style?

D = 3
k = 2 # arguments

Q = rand(SMatrix{D,k})
u = rand(SVector{D})

# 1
@btime cat(2, u, Q) #doesn't return SMatrix

# 2
@btime SMatrix{D, k}(u..., Q...) # slower than 1

Or it is in general not possible / not advised?


#2

Answer by Gauthier Soleilhac (@gsoleilhac)

hcat(vec, mat)