Skip to content

Build failed with MSVC 2019 #215

@Wing-summer

Description

@Wing-summer

Hello, thanks for you portable stack trace library. I compile this library with MSVC 2019 after new updating today, but I get some errors following:

\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp
\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp(94): error C2672: "raii_wrap": no matching overloaded function found
\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp(100): error C2770: invalid explicit template argument for "cpptrace::detail::raii_wrapper<std::remove_reference<_Ty>::type,D,0,0,0> cpptrace::detail::raii_wrap(T,D)"
\3rdparty\cpptrace\src\utils/utils.hpp(270): note: See the declaration of "cpptrace::detail::raii_wrap"
\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp(109): error C3536: "duplicated_handle": cannot be used before initialization
\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp(109): error C2660: "DuplicateHandle": function does not accept 6 parameters
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\handleapi.h(46): note: See the declaration of "DuplicateHandle"
\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp(125): error C2672: "cpptrace::detail::exchange": No matching overloaded function found
\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp(131): error C3536: "info": cannot be used before initialization
\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp(131): error C2664: "std::_Insert_return_type<std::_List_iterator<std::_List_val<std::_List_simple_types<_Ty>>>,std::_Node_handle<std::_List_node<std::pair<const HANDLE,cpptrace::detail::dbghelp_syminit_info>,std::_Default_allocator_traits<_Alloc>::void_pointer>,_Alloc,std::_Node_handle_map_base,_Kty,cpptrace::detail::dbghelp_syminit_info>> std::_Hash<std::_Umap_traits<_Kty,cpptrace::detail::dbghelp_syminit_info,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::insert(std::_Node_handle<std::_List_node<std::pair<const HANDLE,cpptrace::detail::dbghelp_syminit_info>,std::_Default_allocator_traits<_Alloc>::void_pointer>,_Alloc,std::_Node_handle_map_base,_Kty,cpptrace::detail::dbghelp_syminit_info> &&)": Unable to change parameter 1 from 'initializer list" is converted to "std::_Node_handle<std::_List_node<std::pair<const HANDLE,cpptrace::detail::dbghelp_syminit_info>,std::_Default_allocator_traits<_Alloc>::void_pointer>,_Alloc,std::_Node_handle_map_base,_Kty,_Ty> &&” with [ _Ty=std::pair<const HANDLE,cpptrace::detail::dbghelp_syminit_info>, _Alloc=std::allocator<std::pair<const HANDLE,cpptrace::detail::dbghelp_syminit_info>>, _Kty=HANDLE, _Hasher=std::hash<HANDLE>, _Keyeq=std::equal_to<HANDLE> ] and [ _Alloc=std::allocator<std::pair<const HANDLE,cpptrace::detail::dbghelp_syminit_info>>, _Kty=HANDLE, _Ty=cpptrace::detail::dbghelp_syminit_info ] C:\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp(131): note: The reason is as follows: Cannot convert from 'initializer list' to 'std::_Node_handle<std::_List_node<std::pair<const HANDLE,cpptrace::detail::dbghelp_syminit_info>,std::_Default_allocator_traits<_Alloc>::void_pointer>,_Alloc,std::_Node_handle_map_base,_Kty,_Ty>” with [ _Alloc=std::allocator<std::pair<const HANDLE,cpptrace::detail::dbghelp_syminit_info>>, _Kty=HANDLE, _Ty=cpptrace::detail::dbghelp_syminit_info ] C:\3rdparty\cpptrace\src\platform\dbghelp_utils.cpp(131): note: No constructor can accept the source type, or the constructor overload resolution is ambiguous
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xhash(1454): note: See the declaration of "std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::insert"
with
[
_Kty=HANDLE,
_Ty=cpptrace::detail::dbghelp_syminit_info,
_Hasher=std::hash<HANDLE>,
_Keyeq=std::equal_to<HANDLE>,
_Alloc=std::allocator<std::pair<const HANDLE,cpptrace::detail::dbghelp_syminit_info>> ]

I will apreciate it if you can fix the errors. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions