sheredom / utf8.h

📚 single header utf8 string functions for C and C++
The Unlicense
1.69k stars 123 forks source link

Better compatibility with MSVC compiler #124

Closed ScriptExec closed 1 week ago

ScriptExec commented 2 weeks ago

This commit removes the need to include /Zc:__cplusplus in Visual Studio projects, by replacing __cplusplus macro with utf8_cplusplus, which uses _MSVC_LANG to get the current C++ version. On other compilers utf8_cplusplus is defined as __cplusplus.

sheredom commented 2 weeks ago

There is some Microsoft Visual Studio 14.0 specific failure with this change.

ScriptExec commented 1 week ago

I will try to fix the issue, which is most likely related to constexpr not being fully implemented in Microsoft's C++14 in the Visual Studio 14.

sheredom commented 1 week ago

I think the macos runners must be dead now (I'll do a followup PR), thanks for the change and sorry for being slow to respond!