folly
folly copied to clipboard
error C2382: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Eos': redefinition; different exception specifications
When I install fizz via vcpkg, I got the following error, please see https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1899576#3757648 for details, thanks:
E:\Mengna\vcpkg\installed\x64-windows\include\folly/memory/UninitializedMemoryHacks.h(275): error C2382: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Eos': redefinition; different exception specifications
\vcfs\Archive\msvc\fe\20230823.13\binaries.amd64ret\inc\xstring(4821): note: see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Eos'
E:\Mengna\vcpkg\installed\x64-windows\include\folly/memory/UninitializedMemoryHacks.h(276): error C2382: 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Eos': redefinition; different exception specifications
\vcfs\Archive\msvc\fe\20230823.13\binaries.amd64ret\inc\xstring(4821): note: see declaration of 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Eos'
this should help you: https://github.com/facebook/folly/pull/1935
@pps83 Thanks for your help, I still encountered the same error after applying your patch.
what VS version do you use (what's the value of _MSC_VER?) That's the part that I had to add to fix exactly the same error that you have when I updated to latest VS 2022: https://github.com/facebook/folly/pull/1935/files#diff-d3b374d501f30f3ff55c06a64643ae8b2a03c6d274fc65bdc30b31cf4a920511R288
what VS version do you use (what's the value of _MSC_VER?) That's the part that I had to add to fix exactly the same error that you have when I updated to latest VS 2022: https://github.com/facebook/folly/pull/1935/files#diff-d3b374d501f30f3ff55c06a64643ae8b2a03c6d274fc65bdc30b31cf4a920511R288
my version is 1937.
my version is 1937.
Try that patch, but change line 288 to #if (_MSC_VER >= 1937). Or, update VS to latest, which is Version 17.8.0 now and should make it 1938.
my version is 1937.
Try that patch, but change line 288 to
#if (_MSC_VER >= 1937). Or, update VS to latest, which is Version 17.8.0 now and should make it 1938.
It's works well.
@BillyONeal I noticed that you have different commit, do you have different opinions on this fix? If not, I will apply this patch to VCPKG.
@BillyONeal I noticed that you have different commit, do you have different opinions on this fix? If not, I will apply this patch to VCPKG.
Your patch is more extensive than I was comfortable doing in vcpkg; there I just backed off to plain resize when the condition happens. Notably I didn't fix the asan problem.
Without explicit approval from upstream I wanted to be as conservative as possible in just keeping it building