-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
clang fail to compile, implicit conversion from one custom domain to another #278
Comments
One other thing i noticed 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:
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. |
@ned14 unfortunately, the bug is still remain. i tried clang version 18.1.6 on my local machine, same error on compiler explorer (18.1.0) as well. |
Ok, reopened. Does this issue appear if using Boost.Outcome instead of standalone Outcome? |
Yes this issue appear when using Boost.Outcome. i just try with Boost 1.85, with clang 18.1.6. (edit) The same code compile successfully on MSVC 19.40.33811.0.
compiler output output
|
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:
The text was updated successfully, but these errors were encountered: