-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix the utf8 convertor for VS2017 #1849
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
Conversation
The errors in the CI build process seem to be unrelated to this change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks.
@@ -10,12 +10,34 @@ | |||
namespace antlrcpp { | |||
// For all conversions utf8 <-> utf32. | |||
// VS 2015 has a bug in std::codecvt_utf8<char32_t> (VS 2013 works fine). | |||
#if defined(_MSC_VER) && _MSC_VER == 1900 | |||
#if defined(_MSC_VER) && _MSC_VER > 1900 && _MSC_VER < 2000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be #if defined(_MSC_VER) && _MSC_VER >= 1900
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, true. @shravanrn can you fix that yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and bellow
Sorry about the delay. Based on comments I realized I had actually gotten this slightly incorrect the last time. I have double checked that the following works for both VS2015 and VS 2017 |
@mike-lischke @KindDragon - Just a friendly reminder :) |
We need @parrt for a merge. Development on ANTLR4 stopped abruptly and everybody is now waiting for a new time slot where things begin to move again. However, it's not sure that "everybody" has time to move at the same moment as the ANTLR4 starts moving again... |
Sorry...here ya go. |
The UTF8 conversion functions are broken in a slightly different way in VS2017. Add functions to hide these differences