victorvianna wrote:

> But I'm not sure if std::ranges::to should be the default fix-it for 
> containers with/without from_range_t.

@zwuis 
Hm, the std::from_range version feels a bit more concise and easier to read due 
to less nested "<>". But yeah, in terms of simplifying the check logic, always 
using std::ranges::to<> would be the simplest. Is there a mailing list where we 
can ask for feedback?

// variable declarations
auto m = std::ranges::to<std::unordered_map<std::string, int>>(v);
std::unordered_map<std::string, int> m(std::from_range, v);
// other expressions
return std::ranges::to<std::unordered_map<std::string, int>>>(v);
return std::unordered_map<std::string, int>(std::from_range, v);

https://github.com/llvm/llvm-project/pull/180868
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to