3 ms·
PS (too late for edit so I'm replying to myself): with the above Clang extension you can also define your own phat_ptr_t struct and still associate the length w
by flohofwoe 2y ago
PS (too late for edit so I'm replying to myself): with the above Clang extension you can also define your own phat_ptr_t struct and still associate the length with the pointer. Not sure if that's also possible with the Microsoft extension, for instance this is copied from the proposal text:
typedef struct {
int *__counted_by(count) buf;
size_t count;
} sized_buf_t;