Parsing broken for class template that has function using return type deduction

Visual Studio Community 2018 version 15.8.1

reSharper c++2018.2

 

ReSharper C++'s suggestion does not work about class template that using return type deduction for normal functions (see [N3638]
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3638.html))
working with C++14 or later and suggestion for all member function and data member has stopped.

 

template<typename Type>
struct ct {
int dm;
auto mf() {
// Suggestion **cannot** show `dm` and `mf`.
}
};

It seemed to me that ReSharp C++'s parsing has broken at function mf.

If mf using late return types (see [N2835]
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2825.html)),
all is work correctly.

 

template<typename Type>
struct ct {
int dm;
auto mf() -> void {
// Suggestion **can** show `dm` and `mf`.
}
};
4 comments

Hello!

By suggestion do you mean items in the completion list? If so then I can't reproduce this problem:

Could you please create a small solution where this issue reproduces and send it to us?

Thanks!

0

Sorry, previous post's code is wrong.

template<typename T>
struct a {
auto f() {
}
};

void b() {
a<int> x;
// x.f();
}

void c() {
a<int> x;
x.f();
// x.f();
}

x.f does not suggested in function b (comment outed code) if function c erased.

x.f suggested in function c (comment outed code) if function b erased.

 

0

Thanks!

It is indeed a regression in 2018.2, we'll fix it in 2018.2.1 whenever it's out (https://youtrack.jetbrains.com/issue/RSCPP-23271).

0

Please sign in to leave a comment.