Skip to content
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

error C2382: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Eos': redefinition; different exception specifications #2100

Open
Adela0814 opened this issue Nov 20, 2023 · 7 comments

Comments

@Adela0814
Copy link

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'
@pps83
Copy link

pps83 commented Nov 21, 2023

this should help you: #1935

@Adela0814
Copy link
Author

@pps83 Thanks for your help, I still encountered the same error after applying your patch.

@pps83
Copy link

pps83 commented Nov 21, 2023

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

BillyONeal added a commit to BillyONeal/vcpkg that referenced this issue Nov 22, 2023
@Adela0814
Copy link
Author

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.

@pps83
Copy link

pps83 commented Nov 23, 2023

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.

@Adela0814
Copy link
Author

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
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants