Closed frkami123 closed 2 weeks ago
One other thing i noticed If you try to replace
template<class DomainType>
friend class SYSTEM_ERROR2_NAMESPACE::status_code;
with
template<class DomainType>
friend class OUTCOME_V2_NAMESPACE::experimental::status_code;
clang would error out:
/app/SystemCode.hpp:27:52: error: friend declaration of 'status_code' does not match any declaration in namespace 'outcome_v2::experimental'
friend class OUTCOME_V2_NAMESPACE::experimental::status_code;
While GCC, and MSVC seem fine with this. I don't know if it related or a different bug, or an existing clang bug.
Alas it does not surprise me clang 16 has issues :(
clang 18 has considerably improved QoI since 16, so if your issue repros in clang 18 please do reopen this issue.
I have two custom domains
SystemStatusDomain
andEngineStatusDomain
. i want to implicitly convert thefailure_type<SystemStatus>
tobasic_result<void, EngineStatus, outcome_v2::experimental::policy::all_narrow>
I have added the
make_status_code
implict conversion function to enable ADLThis setup works fine on Linux Mint with GCC12, and MSVC (cl version 19.36.32535) on Windows 10. But doesn't compile with clang-cl 16.0.6 on Windows. I tried clang 16.0.0 on compiler explorer and run into the same compile error.
Here the setup in compiler explorer with CMake. https://compiler-explorer.com/z/WvcPsG7ha
I tried to figure out what happened but it seem like detai::safe_get_make_status_code_result doesn't behave nicely on clang.
Here a summary of clang output: