kazutakahirata wrote:

> May I ask what is the reason for this change? What problem does std::unique 
> have that llvm::unique solves?

- `llvm::unique(Foo)` is shorter than `std::unique(Foo.begin(), and Foo.end())`.
- `llvm::unique(Foo)` prevents us from mistakenly specifying two unrelated 
iterators like `std::unique(This.begin(), That.end())`.

https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/ADT/STLExtras.h
 has a collection of similar functions.



https://github.com/llvm/llvm-project/pull/136514
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to