Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.17.7 regression: IntelliSense reports incorrect "no suitable constructor" error #2422

Closed
sean-mcmanus opened this issue Aug 17, 2018 · 1 comment
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service parser regression A bug that didn't exist in a previous release
Milestone

Comments

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 17, 2018

See https://developercommunity.visualstudio.com/content/problem/314489/158-regression-c-intellisense-reports-incorrect-no.html .

template <typename TT>
class Base
{
public:
	Base(const int &rhs) : ss(rhs) { }
	Base(const TT &rhs) : ss(rhs.ss) { }
protected:
	int ss;
};


class cc : public Base<cc>
{
public:
	using Base<cc>::Base;
};
 

int main()
{
	int f;
	cc c = f; // no suitable constructor exists to convert from "int" to "cc"
}
@sean-mcmanus
Copy link
Collaborator Author

sean-mcmanus commented Nov 2, 2018

Adding this line to "cc" is a workaround (but that workaround is insufficient in more complicated scenarios):

 cc(const cc&) = delete;

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Dec 7, 2018
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, December 2018 Dec 7, 2018
@sean-mcmanus sean-mcmanus self-assigned this Dec 7, 2018
@sean-mcmanus sean-mcmanus removed their assignment Dec 22, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service parser regression A bug that didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

1 participant