[clang] [WIP][clang]: Implement a conditional lifetimebound_if builtin. (PR #125520)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 20 13:21:33 PST 2025
hokein wrote:
> It would be nice if you could share some code snippets how exactly this would be used in practice.
Some simple examples from Abseil. When using `lifetime_capture` in the `insert` method, we currently have two overloads:
- [one overload](https://github.com/abseil/abseil-cpp/blob/7971b4aabde5d326bc18dd7faa6fba6c891aa40a/absl/container/internal/raw_hash_set.h#L2904) is annotated (for view types);
- [the other overload](https://github.com/abseil/abseil-cpp/blob/7971b4aabde5d326bc18dd7faa6fba6c891aa40a/absl/container/internal/raw_hash_set.h#L2894) is unannotated (for non-view types);
https://github.com/llvm/llvm-project/pull/125520
More information about the cfe-commits
mailing list