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
MSVC build fail #2
Comments
When I had a working MSVC setup, I used to report the compiler bugs I found, but they were rarely fixed. Now I've just given up. BTW, I'm likely to make a major update to this library after the NDC{TechTown} conference (later this week) where I'm presenting other techniques for achieving the same functionality. The code will be very much shorter after that. |
Thanks for the answer. Of course, I would like to use it on Windows, unfortunately it is necessary to work ( |
Really stoked to try this out after seeing your TechTown talk, but unfortunately, MSVC spits out "error C1202: recursive type or function dependency context too complex". Really hope you can get some version of this library MSVC-compatible! |
Thank you. I've spent a lot of time the last few days, trying to simplify the code, but things are not going well (unless you count 3 filed compiler bug reports as "going well.") It's primarily the conditional |
Here's compilation with MSVC. It took removing all conditional https://gcc.godbolt.org/z/96Zhvw I'll see if it is possible to simplify the code by having conditional support for |
Proof of concept implementation supporting latest clang, gcc and MSVC. Sacrifices are made regarding primarily Feel free to play with it. |
The new version looks great. |
A terrible thought, but what if we allow this syntax?
Proof of concept implementation(only for all_of and ==) https://godbolt.org/z/N5JrhT |
That's problematic, and there already is one: #include <algorithm>
if (std::all_of(s.begin(), s.end(), [](auto x) { return x == 1; })
... Or, if I get my higher order functions in place properly: #include <algorithm>
if (std::all_of(s.begin(), s.end(), equal_to(1)))
... |
I agree, just a funny idea that came at night. Why
|
Hmm, maybe I'm just being thick here, but I can't get the following example to work, which would be my primary use-case for this:
This is on VS 16.2.4, /std:C++latest. Error output is:
Have I fundamentally misunderstood the syntax? |
Thank you @tagsemb . I'm not sure I understand that error, but I'm glad the latest version does work with your example code. Why is |
It does indeed, cheers! |
For anyone who is still interested in using it with MSVC, I got it compiled and ran in Microsoft Visual Studio Community 2019 (Version 16.11.5) with a minor change in CMake set(CMAKE_CXX_STANDARD 20) |
This is excellent, @bxk-sonavex. Please submit a PR with an updated CMakeLists.txt (where this requirement is for MSVC only). |
@rollbear Done. |
The text was updated successfully, but these errors were encountered: