Description
In linalg.h, the is_arithmetic type trait is used to constrain native vector component types.
|
template <typename T> struct is_arithmetic { |
However, for various cases, we should allow packed component types, yet we probably don't want to consider them arithmetic, even if packed component types are accepted everywhere we would check in this API.
I recommend we add a new type trait (likely specific to LinAlg for now) for identifying component types that include packed types, and use that instead wherever packed types should be accepted.
Description
In
linalg.h, theis_arithmetictype trait is used to constrain native vector component types.DirectXShaderCompiler/tools/clang/lib/Headers/hlsl/dx/linalg.h
Line 14 in c763461
However, for various cases, we should allow packed component types, yet we probably don't want to consider them arithmetic, even if packed component types are accepted everywhere we would check in this API.
I recommend we add a new type trait (likely specific to LinAlg for now) for identifying component types that include packed types, and use that instead wherever packed types should be accepted.