-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Description
Raw buffer resources, like StructuredBuffer, need concept decls so that their element types can be validated. The concepts need to use the negation of the is_intangible builtin, that should be a sufficient condition to impose on element types.
Tests need to be added. This issue is resolved when there are tests that show that raw buffers with invalid element types fail at compile time.
The infrastructure has all been added, all that's needed is another function, like constructTypedBufferConstraintExpr
, but for raw buffers. It needs to be passed as an argument to the forward declarations of the relevant buffers, in the addSimpleTemplateParams
function, just like constructTypedBufferConstraintExpr
's return value was. The content should be just like constructTypedBufferConstraintExpr
, except the constraint expression should, instead of using the typed element compatible builtin, use __is_intangible
, and then add a Unary expression that negates the result.
Note: also consider the case where sizeof(T) == 0. This should be rejected!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status