You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and detail::is_gengeofloat<T> is only true for type_list<float, vec<float, 1>, vec<float, 2>, vec<float, 3>, vec<float, 4>>.
I'm not sure if the solution is to include the SwizzleOp types in geo_float_list or to define a specialization for length etc for SwizzleOp types, but as the StackOverflow OP points out, this somewhat defeats the purpose of swizzle convenience operations.
The text was updated successfully, but these errors were encountered:
Describe the bug
Swizzled vector types can't be passed directly to
length()
becausedetail::is_gengeohalf<T>::value
isfalse
for these types.From this StackOverflow question.
To Reproduce
The above code fails to compile because it cant deduce typename T of
length
(should befloat2
?) If one instead hasauto len = length<float2>(myVec.zy());
it works fine.
Additional context
length()
is defined in builtins.hpp:and
detail::is_gengeofloat<T>
is onlytrue
fortype_list<float, vec<float, 1>, vec<float, 2>, vec<float, 3>, vec<float, 4>>
.I'm not sure if the solution is to include the SwizzleOp types in
geo_float_list
or to define a specialization forlength
etc for SwizzleOp types, but as the StackOverflow OP points out, this somewhat defeats the purpose of swizzle convenience operations.The text was updated successfully, but these errors were encountered: