================ @@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) { return Str; } -CXStringSet *createSet(const std::vector<std::string> &Strings) { +template <typename StringTy, bool Copy> +static CXStringSet *createSetImpl(ArrayRef<StringTy> Strings) { ---------------- jansvoboda11 wrote:
Nit: If you switched the order of template parameters, the compiler would be able to deduce `StringTy` at the call site and clients wouldn't need to pass it explicitly as a template argument. The downside is that the call in `createSet()` would need to do `ArrayRef(Strings)` explicitly - without it it'd be one implicit conversion too many. Not saying this approach is better than what you currently have, just something to consider. https://github.com/llvm/llvm-project/pull/136773 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits