veselink1 / refl-cpp

Static reflection for C++17 (compile-time enumeration, attributes, proxies, overloads, template functions, metaprogramming).
https://veselink1.github.io/refl-cpp/md__introduction.html
MIT License
1.05k stars 76 forks source link

Don't build on Windows 10 in VS 2017 version 15.9.26 #39

Closed AlexCasual closed 3 years ago

AlexCasual commented 3 years ago

1>c:\source\repos\testtest_0\testtest_0\refl.hpp(1383): error C2672: 'refl::trait::detail::index_of_instance': no matching overloaded function found 1>c:\source\repos\testtest_0\testtest_0\refl.hpp(1385): note: see reference to class template instantiation 'refl::trait::index_of_instance<T,refl::util::type_list>' being compiled 1>c:\source\repos\testtest_0\testtest_0\refl.hpp(1383): error C3207: 'refl::trait::detail::index_of_instance': invalid template argument for 'T', class template expected 1>c:\source\repos\testtest_0\testtest_0\refl.hpp(1326): note: see declaration of 'refl::trait::detail::index_of_instance'

PizzaCutter commented 3 years ago

I have the same issue :/

jakubtyrcha commented 3 years ago

I managed to bypass the issue: https://github.com/jakubtyrcha/refl-cpp/commit/8c428fca21e0c96542b215d9027c47a270899372 It still compiles with gcc and clang. Unfortunatelly it's not enough to fix all problems with msvc and for example most of the tests still don't compile. Some of that advanced TMP syntax is alien to me, so I'm not sure if the problem is with the code or the compiler.

veselink1 commented 3 years ago

Should be fixed in the referenced commit. Can you please confirm?

ccvca commented 3 years ago

I was able to compile it with Visual Studio 2019.

ccvca commented 3 years ago

Verified also on github actions: 1ebf545 failed (current master): https://github.com/umati/Sample-Server/pull/5/checks?check_run_id=1462750553#step:8:48

9b6aa1a is fine for VS 2019 (VS 2017 could not be tested, as the rest of the project is requires VS 2019): https://github.com/umati/Sample-Server/runs/1462593095#step:8:32

veselink1 commented 3 years ago

Verified tests run on VS2017 with 9b6aa1a applied.