-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[MSVC][std:c++latest] forgottenserver failed to build with /std:c++latest on MSVC #3947
Comments
have you tried using |
Yes, it compiles passed using /std:c++17, but /std:c++latest doesn't work. |
@xiaoxiao-Xu can you please check #3954 ? |
@xiaoxiao-Xu What is RWC testing? I see overtime MS team has opened several issues on repos across github that say the same thing. |
|
@EPuncker Thanks for your fix. The issue has resolved. |
This is rad. So good to see our effort is noticed even outside our community :) |
Hi,
The MSVC team recently added forgottenserver as part of RWC testing. And we found some errors when building forgottenserver with '/std:c++latest'. Could you please help look at this issue or provide some workarounds? Thanks in advance.
Steps to reproduce (include any configuration/script required to reproduce)
Expected behaviour
forgottenserver project could build successfully under '/std:c++latest'.
Actual behaviour
build.log
outputmessage.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory(443,66): error C2027: use of undefined type 'std::_Replace_first_parameter<_Other,_Ty>'
with
[
_Other=_Refoa,
_Ty=LockfreePoolingAllocator<void,2048>
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory(443): note: see declaration of 'std::_Replace_first_parameter<_Other,_Ty>'
with
[
_Other=_Refoa,
_Ty=LockfreePoolingAllocator<void,2048>
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2818): note: see reference to class template instantiation 'std::_Get_rebind_type<_Alloc,_Refoa,void>' being compiled
with
[
_Alloc=LockfreePoolingAllocator<void,2048>
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory(727): note: see reference to alias template instantiation 'std::_Normal_allocator_traits<_Alloc>::rebind_alloc<_Refoa>' being compiled
with
[
_Alloc=LockfreePoolingAllocator<void,2048>
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2822): note: see reference to alias template instantiation 'std::_Rebind_alloc_t<LockfreePoolingAllocator<void,2048>,_Refoa>' being compiled
F:\gitP\otland\forgottenserver\src\outputmessage.cpp(81): note: see reference to function template instantiation 'std::shared_ptr std::allocate_shared<OutputMessage,LockfreePoolingAllocator<void,2048>,>(const _Alloc &)' being compiled
with
[
_Alloc=LockfreePoolingAllocator<void,2048>
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory(443,60): error C2061: syntax error: identifier 'type'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory(540,69): error C2794: 'type': is not a member of any direct or indirect base class of 'std::_Get_rebind_type<_Alloc,_Refoa,void>'
with
[
_Alloc=LockfreePoolingAllocator<void,2048>
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2818,1): error C2938: 'std::_Normal_allocator_traits<_Alloc>::rebind_alloc' : Failed to specialize alias template
with
[
_Alloc=LockfreePoolingAllocator<void,2048>
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2818,1): error C2938: 'std::_Rebind_alloc_t' : Failed to specialize alias template
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2824,48): error C2641: cannot deduce template arguments for 'std::_Alloc_construct_ptr'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2818,1): error C2893: Failed to specialize function template 'std::_Alloc_construct_ptr<_Alloc> std::_Alloc_construct_ptr(_Alloc &)'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory(997): note: see declaration of 'std::_Alloc_construct_ptr'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2818,1): note: With the following template arguments:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2818,1): note: '_Alloc=_Alblock'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2818,1): error C2784: 'std::_Alloc_construct_ptr<_Alloc> std::_Alloc_construct_ptr(std::_Alloc_construct_ptr<_Alloc>)': could not deduce template argument for 'std::_Alloc_construct_ptr<_Alloc>' from '_Alblock'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory(992): note: see declaration of 'std::_Alloc_construct_ptr'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2818,1): error C2784: 'std::_Alloc_construct_ptr<_Alloc> std::_Alloc_construct_ptr(std::_Alloc_construct_ptr<_Alloc>)': could not deduce template argument for 'std::_Alloc_construct_ptr<_Alloc>' from '_Alblock'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory(992): note: see declaration of 'std::_Alloc_construct_ptr'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2828,51): error C2672: 'addressof': no matching overloaded function found
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2828,16): error C2737: '_Ptr': const object must be initialized
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\memory(2818,1): error C3536: '_Ptr': cannot be used before it is initialized
Environment
Operating System: Windows server 2019
Compiler: MSVC
The text was updated successfully, but these errors were encountered: