I looked through the suggestions but could not find the likes of my error. I ran into this with vs141 and fixed it, I believe by changing the c++ ISO Standard
in VS. I may have been too hasty in uninstalling VS2017 when I installed VS2019, so I can't go back to see what I did. It just works with vs140 which I do still have installed. This code will produce the vs142 error:
struct t1{
t1 append() { return t1(); }
};
struct t2 : public t1{
t2(t1&te):t1(te){}
t2 add() { return t1().append(); } //error C2440
};
In my case, t1 is from another library, and I'm wrapping it with t2. I've tried all the variants of c++ ISO Standard
in VS2019, but the error persists.
To add to my confusion, I've compiled another project that uses the same code with VS2019, and no error! This Code, line 36. (Note, now there is a problem with boost::fusion and boost::spirit::x3. But that is something else).
What I am doing may be illegal, but when it works, it works fine. And as I don't know for sure, I think it should be fine.