philnik777 wrote: I could see that it would be useful to have an attribute `[[clang::container(T, additional-properties)]]`. The type this is applied to would be guaranteed to fulfill [container.requirements] as well as whatever other properties `additional-properties` require. Initial ideas for `additional-properties`: - "sequence-container" for [sequence.reqmts] - "node-container" for [container.node] - "associative-container" for [associative.reqmts] - "reversible-container" for [container.rev.reqmts] - "allocator-aware-container"(Alloc) for [container.alloc.reqmts] - "enforce-allocator-requirements" to diagnose incorrect allocators - "enforce-completeness-requirements" for the initial goal of this patch
We of course wouldn't want to allow nonsensical combinations like "sequence-container" and "associative-container" or "enforece-allocator-requirements" without "allocator-aware-container". I'm not quite sure whether "allocator-aware-container" should be done in that way, but that seems like a rather niche detail. WDYT? Is that a direction worth pursuing? https://github.com/llvm/llvm-project/pull/211231 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
