-
Notifications
You must be signed in to change notification settings - Fork 624
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
Visual Studio build issue #1730
Comments
I'm fairly sure it's VS2019 issue. That's really unfortunate. We have VS bots, but much older than 2019. We also have a dozen other bots. gcc 4.8 has a similar issue with that piece of code, but gcc 4.9+, multiple clang versions, one MSVC version, and at least another compiler are all happy with it. I also reviewed the code and the error doesn't make sense. |
We can dedicate a bot to VS2019 but now that it is broken lets see what Microsoft thinks about it https://developercommunity.visualstudio.com/comments/584497/view.html Thanks for filing the bug and reporting to Microsoft also. |
VS2019 bot would be great. For those reading this, the reason I think this is a compiler issue is that the relevant code uses decltype to return, so the error doesn't make sense. What the error means is that decltype returned a type different from the type that returning the same expression from the function is deemed to have. |
Ok, both 2017 and 2019 are broken right now (but 2015 is OK) https://ci.appveyor.com/project/harfbuzz/harfbuzz/builds/24876208/job/kbbbuu0562f975a4 https://ci.appveyor.com/project/harfbuzz/harfbuzz/builds/24876208/job/0xv7ufq6r8j3ycss |
2013 is also broken https://ci.appveyor.com/project/harfbuzz/harfbuzz/builds/24877151/job/2yt5d21fv4cww4t6 and the only MSVC which is not broken is apparently 2015 which was on our CI :) |
Maybe it's worth it not to hide these errors and turn on VS2017 build bots back? |
Orvid King provided me the following extremely hacky patch that seems to at least make it compile: diff --git a/src/hb-algs.hh b/src/hb-algs.hh
index 007db9e4..2bd86b3b 100644
--- a/src/hb-algs.hh
+++ b/src/hb-algs.hh
@@ -167,10 +167,18 @@ template <unsigned Pos=1, typename Appl, typename V>
auto hb_partial (Appl&& a, V&& v) HB_AUTO_RETURN
(( hb_partial_t<Pos, Appl, V> (a, v) ))
+#if _MSC_VER
+#define HB_PARTIALIZE(Pos) \
+ template <typename _T> \
+ decltype(auto) operator() (_T &&_v) const { \
+ hb_partial<Pos> (this, hb_forward<_T> (_v)) \
+ } static_assert (true, "")
+#else
#define HB_PARTIALIZE(Pos) \
template <typename _T> \
auto operator () (_T&& _v) const HB_AUTO_RETURN (hb_partial<Pos> (this, hb_forward<_T> (_v))) \
static_assert (true, "")
+#endif
struct |
Okay committed Orvid's solution. |
Coool! |
Thank you! |
Using hb2.5.0 I see following error.
There are tons of these errors from many source files.
Do you test VS2019? I use custom build, so it might be only my issue.
Or it could be VS issue.
The text was updated successfully, but these errors were encountered: