Closed QuellaZhang closed 5 years ago
You have a much more conforming C++ 20 implementation than the existing compilers Outcome was tested upon! Thanks for the BR, I'll try to schedule some remedial work on this later this week.
Can you check if trunk is fixed on this please? I believe it ought to be.
Hi @ned14, sorry for the late. We removed the patch and built the latest Outcome source code dd50d7d, it still failed due to the above errors. I attached the build log. Could you help look?log_x86_build_outcome.log
I fixed the obvious errors, but I suspect the next time you cycle this it will still fail. I am unsure what to do here, I cannot see how my code is not correct. I assume that your MSVC version will be the next point release of Visual Studio?
Thank you very much @ned14 . Double confirmed this issue has been fixed. Sorry for your confusion.
Oh ok, Thanks for reporting the issue!
Outcome build failed due to "error C3864 requires clause is incompatible with the declaration" under /std:c++latest(C++20) on MSVC, 'requires' is a keyword in C++20. Could you help look at this? Thanks in advance!
Repro steps:
Our workaround:outcomelatest.patch.txt
Failures: D:\Outcome\src\include\outcome\detail/basic_result_storage.hpp(63): error C3864: 'outcome_v2_0c35dcf2::detail::basic_result_storage': requires clause is incompatible with the declaration D:\Outcome\src\include\outcome\detail/basic_result_storage.hpp(157): note: see reference to class template instantiation 'outcome_v2_0c35dcf2::detail::basic_result_storage<R,EC,NoValuePolicy>' being compiled D:\Outcome\src\include\outcome\detail/basic_result_storage.hpp(166): error C2955: 'outcome_v2_0c35dcf2::detail::basic_result_storage': use of class template requires template argument list D:\Outcome\src\include\outcome\detail/basic_result_storage.hpp(57): note: see declaration of 'outcome_v2_0c35dcf2::detail::basic_result_storage' D:\Outcome\src\include\outcome\detail/basic_result_storage.hpp(172): note: see reference to class template instantiation 'outcome_v2_0c35dcf2::detail::basic_result_storage_swap<value_throws,error_throws>' being compiled D:\Outcome\src\include\outcome\detail/basic_result_storage.hpp(166): error C2955: 'outcome_v2_0c35dcf2::detail::basic_result_storage': use of class template requires template argument list D:\Outcome\src\include\outcome\detail/basic_result_storage.hpp(57): note: see declaration of 'outcome_v2_0c35dcf2::detail::basic_result_storage' D:\Outcome\src\include\outcome\detail/basic_result_storage.hpp(166): error C2955: 'outcome_v2_0c35dcf2::detail::basic_result_storage': use of class template requires template argument list D:\Outcome\src\include\outcome\detail/basic_result_storage.hpp(57): note: see declaration of 'outcome_v2_0c35dcf2::detail::basic_result_storage' D:\Outcome\src\include\outcome\convert.hpp(38): error C2062: type 'bool' unexpected D:\Outcome\src\include\outcome\convert.hpp(39): error C2143: syntax error: missing ';' before '{' D:\Outcome\src\include\outcome\convert.hpp(39): error C2447: '{': missing function header (old-style formal list?) D:\Outcome\src\include\outcome\convert.hpp(50): error C2062: type 'bool' unexpected D:\Outcome\src\include\outcome\convert.hpp(51): error C2143: syntax error: missing ';' before '{' D:\Outcome\src\include\outcome\convert.hpp(51): error C2447: '{': missing function header (old-style formal list?) D:\Outcome\src\include\outcome\detail/basic_result_final.hpp(35): error C3203: 'basic_result_storage': unspecialized class template can't be used as a template argument for template parameter 'Base', expected a real type D:\Outcome\src\include\outcome\detail/basic_result_final.hpp(44): error C3770: 'unknown-type': is not a valid base class D:\Outcome\src\include\outcome\detail/basic_result_final.hpp(144): note: see reference to class template instantiation 'outcome_v2_0c35dcf2::detail::basic_result_final<R,S,NoValuePolicy>' being compiled D:\Outcome\src\include\outcome\basic_outcome.hpp(195): error C3864: 'outcome_v2_0c35dcf2::basic_outcome': requires clause is incompatible with the declaration D:\Outcome\src\include\outcome\basic_outcome.hpp(916): note: see reference to class template instantiation 'outcome_v2_0c35dcf2::basic_outcome<R,S,T,N>' being compiled D:\Outcome\src\include\outcome\basic_outcome.hpp(925): error C2955: 'outcome_v2_0c35dcf2::basic_outcome': use of class template requires template argument list D:\Outcome\src\include\outcome\basic_outcome.hpp(188): note: see declaration of 'outcome_v2_0c35dcf2::basic_outcome'