eranpeer / FakeIt

C++ mocking made easy. A simple yet very expressive, headers only library for c++ mocking.
MIT License
1.22k stars 170 forks source link

compiled error with c++17 in VS2019 #285

Closed zhlongfj closed 1 year ago

zhlongfj commented 1 year ago

error info: ”fakeit::NoVirtualDtor::NoVirutualDtor“:static member method does not have "this" point

malcolmdavey commented 1 year ago

Can you give an example of the test you are trying to write?

BTW, I'm using C++17 with VS 2019 (v142 toolset), so can easily compare what I get.

zhlongfj commented 1 year ago

Can you give an example of the test you are trying to write?

BTW, I'm using C++17 with VS 2019 (v142 toolset), so can easily compare what I get.

I found the problem this morning, I changed "TARGET" to "TARGET1" in "template<typename TARGET, typename SOURCE>"(Line: 5256). It's OK now, aybe naming conflicts, but I didn't find "TARGET" in project.

FranckRJ commented 1 year ago

I'll keep it open just to remember to rename these templates parameters. They shouldn't be in uppercase anyway because it may cause issues with macro (probably what happened to you).

FranckRJ commented 1 year ago

Should be fixed by #300, in FakeIt 2.3.1.