3 ms·
It worked fine in VS2015 and works fine in VS2017. It doesn't work in cases where it cannot work, as in ``` template<typename T> void f(const T& t) { auto
by zvrba 9y ago
It worked fine in VS2015 and works fine in VS2017. It doesn't work in cases where it cannot work, as in
```
template<typename T>
void f(const T& t)
{
auto val = t.some_method();
}
```
and here it cannot work because T can be an arbitrary type and there's simply not enough info for intellisense to work and suggest members on val.
- trendia 9y agoQt Creator handles this problem differently. If you call f<int>(0) and f<uchar>(0) within your code, then the Clang code model will process both in the background, check for any syntax errors, and show an error if either one fails. It's very useful while coding because you don't have to wait until compilation time to see an error, and it's a feature I wish VS would implement.
- steveklabnik 9y agoMeta: HN doesn't support markdown, use two spaces to get code formatting. Full docs here: https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc