3 ms·
Rust does a pretty decent job of this, particularly around functions that return collect(). But yeah, C++ has a ways to go on type inference.
by mikepurvis 4y ago
Rust does a pretty decent job of this, particularly around functions that return collect().
But yeah, C++ has a ways to go on type inference.
- tlb 4y agoBetween `auto` and `decltype(auto)` it mostly does what I want, although the 2nd syntax is frightful. The main case it doesn't handle is for (auto i = 0; i < foo.size(); i++) where obviously I want i to match the return type of foo.size(), so a size_t rather than an int.