Skip to content
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

Open
frkami123 opened this issue Jun 29, 2023 · 6 comments
Assignees
Labels

Comments

@frkami123
Copy link

I have two custom domains SystemStatusDomain and EngineStatusDomain. i want to implicitly convert the failure_type<SystemStatus> to basic_result<void, EngineStatus, outcome_v2::experimental::policy::all_narrow>

OUTCOME_V2_NAMESPACE::basic_result<void, Eao::EngineStatus, OUTCOME_V2_NAMESPACE::experimental::policy::all_narrow>
test() 
{
    SystemCode returnCode = SystemCode::Unknown;
    using Eao::make_error_code;
    using EC = std::decay_t<decltype(make_error_code(returnCode))>;
    return OUTCOME_V2_NAMESPACE::failure_type<EC>{make_error_code(returnCode), 0};
}

I have added the make_status_code implict conversion function to enable ADL

constexpr inline auto make_status_code(SystemStatus systemStatus) -> EngineStatus
{
  const EngineCode code = static_cast<EngineCode>(systemStatus.value().statusCode);
  return make_error_code(code);
}

This 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:

[ 50%] Building CXX object CMakeFiles/the_executable.dir/main.cpp.o
/app/main.cpp:14:12: error: no viable conversion from returned value of type 'outcome_v2::failure_type<EC>' (aka 'failure_type<system_error2::status_code<Eao::SystemStatusDomain>>') to function return type 'outcome_v2::basic_result<void, Eao::EngineStatus, outcome_v2::experimental::policy::all_narrow>' (aka 'basic_result<void, status_code<EngineStatusDomain>, outcome_v2::policy::all_narrow>')
    return OUTCOME_V2_NAMESPACE::failure_type<EC>{make_error_code(returnCode),
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:1039:57: note: expanded from macro 'OUTCOME_V2_NAMESPACE'
#define OUTCOME_V2_NAMESPACE QUICKCPPLIB_BIND_NAMESPACE(OUTCOME_V2)
                                                        ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:1027:56: note: expanded from macro 'OUTCOME_V2'
#define OUTCOME_V2 (QUICKCPPLIB_BIND_NAMESPACE_VERSION(outcome_v2))
                                                       ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:939:111: note: expanded from macro 'QUICKCPPLIB_BIND_NAMESPACE_VERSION'
#define QUICKCPPLIB_BIND_NAMESPACE_VERSION(...) QUICKCPPLIB_CALL_OVERLOAD(QUICKCPPLIB_BIND_NAMESPACE_VERSION, __VA_ARGS__)
                                                                                                              ^
note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:825:144: note: expanded from macro 'QUICKCPPLIB_CALL_OVERLOAD_'
#define QUICKCPPLIB_CALL_OVERLOAD_(name, ...) QUICKCPPLIB_GLUE_(QUICKCPPLIB_OVERLOAD_MACRO_(name, QUICKCPPLIB_COUNT_ARGS_MAX8_(__VA_ARGS__)), (__VA_ARGS__))
                                                                                                                                               ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:818:35: note: expanded from macro 'QUICKCPPLIB_GLUE_'
#define QUICKCPPLIB_GLUE_(x, y) x y
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:942:51: note: expanded from macro 'QUICKCPPLIB_BIND_NAMESPACE_SELECT_1'
#define QUICKCPPLIB_BIND_NAMESPACE_SELECT_1(name) name
                                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4488:3: note: candidate constructor not viable: no known conversion from 'outcome_v2::failure_type<EC>' (aka 'failure_type<system_error2::status_code<Eao::SystemStatusDomain>>') to 'basic_result<void, status_code<EngineStatusDomain>, all_narrow> &&' for 1st argument
  basic_result(basic_result && /*unused*/) = default; // NOLINT
  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4492:3: note: candidate constructor not viable: no known conversion from 'outcome_v2::failure_type<EC>' (aka 'failure_type<system_error2::status_code<Eao::SystemStatusDomain>>') to 'const basic_result<void, status_code<EngineStatusDomain>, all_narrow> &' for 1st argument
  basic_result(const basic_result & /*unused*/) = default;
  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4695:13: note: candidate constructor not viable: no known conversion from 'outcome_v2::failure_type<EC>' (aka 'failure_type<system_error2::status_code<Eao::SystemStatusDomain>>') to 'const success_type<void> &' for 1st argument
  constexpr basic_result(const success_type<void> &o) noexcept(std::is_nothrow_default_constructible<value_type>::value) // NOLINT
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4507:3: note: candidate template ignored: constraints not satisfied [with Arg = outcome_v2::failure_type<EC>, Args = <>]
  basic_result(Arg && /*unused*/, Args &&... /*unused*/) = delete; // NOLINT basic_result<T, T> is NOT SUPPORTED, see docs!
  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4506:35: note: because '!predicate::constructors_enabled' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED(!predicate::constructors_enabled && (sizeof...(Args) >= 0)))
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4514:3: note: candidate template ignored: constraints not satisfied [with T = outcome_v2::failure_type<EC>]
  basic_result(T && /*unused*/, implicit_constructors_disabled_tag /*unused*/ = implicit_constructors_disabled_tag()) =
  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4512:71: note: because '!predicate::implicit_constructors_enabled' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED((predicate::constructors_enabled && !predicate::implicit_constructors_enabled //
                                                                      ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4521:13: note: candidate template ignored: constraints not satisfied [with T = outcome_v2::failure_type<EC>]
  constexpr basic_result(T &&t, value_converting_constructor_tag /*unused*/ = value_converting_constructor_tag()) noexcept(
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4520:35: note: because 'predicate::enable_value_converting_constructor<outcome_v2::failure_type<system_error2::status_code<Eao::SystemStatusDomain> > >' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED(predicate::template enable_value_converting_constructor<T>))
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4532:13: note: candidate template ignored: constraints not satisfied [with T = outcome_v2::failure_type<EC>]
  constexpr basic_result(T &&t, error_converting_constructor_tag /*unused*/ = error_converting_constructor_tag()) noexcept(
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4531:35: note: because 'predicate::enable_error_converting_constructor<outcome_v2::failure_type<system_error2::status_code<Eao::SystemStatusDomain> > >' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED(predicate::template enable_error_converting_constructor<T>))
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4544:13: note: candidate template ignored: constraints not satisfied [with ErrorCondEnum = outcome_v2::failure_type<EC>]
  constexpr basic_result(ErrorCondEnum &&t, error_condition_converting_constructor_tag /*unused*/ = error_condition_converting_constructor_tag()) noexcept(
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4542:46: note: because '(error_type(make_error_code(ErrorCondEnum())))' would be invalid: no matching function for call to 'make_error_code'
  OUTCOME_TREQUIRES(OUTCOME_TEXPR(error_type(make_error_code(ErrorCondEnum()))), //
                                             ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4706:13: note: candidate template ignored: could not match 'success_type' against 'failure_type'
  constexpr basic_result(const success_type<T> &o) noexcept(detail::is_nothrow_constructible<value_type, T>) // NOLINT
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4717:13: note: candidate template ignored: could not match 'success_type' against 'failure_type'
  constexpr basic_result(success_type<T> &&o) noexcept(detail::is_nothrow_constructible<value_type, T>) // NOLINT
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4728:13: note: candidate template ignored: constraints not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
  constexpr basic_result(const failure_type<T> &o, explicit_compatible_copy_conversion_tag /*unused*/ = explicit_compatible_copy_conversion_tag()) noexcept(
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4727:35: note: because 'predicate::enable_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED(predicate::template enable_compatible_conversion<void, T, void>))
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4740:13: note: candidate template ignored: constraints not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
  constexpr basic_result(failure_type<T> &&o, explicit_compatible_move_conversion_tag /*unused*/ = explicit_compatible_move_conversion_tag()) noexcept(
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4739:35: note: because 'predicate::enable_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED(predicate::template enable_compatible_conversion<void, T, void>))
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4752:13: note: candidate template ignored: constraints not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
  constexpr basic_result(const failure_type<T> &o,
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4751:35: note: because 'predicate::enable_make_error_code_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED(predicate::template enable_make_error_code_compatible_conversion<void, T, void>))
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4765:13: note: candidate template ignored: constraints not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
  constexpr basic_result(failure_type<T> &&o,
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4764:35: note: because 'predicate::enable_make_error_code_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED(predicate::template enable_make_error_code_compatible_conversion<void, T, void>))
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4778:13: note: candidate template ignored: constraints not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
  constexpr basic_result(const failure_type<T> &o,
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4777:35: note: because 'predicate::enable_make_exception_ptr_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED(predicate::template enable_make_exception_ptr_compatible_conversion<void, T, void>))
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4791:13: note: candidate template ignored: constraints not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
  constexpr basic_result(failure_type<T> &&o,
            ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4790:35: note: because 'predicate::enable_make_exception_ptr_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' evaluated to false
  OUTCOME_TREQUIRES(OUTCOME_TPRED(predicate::template enable_make_exception_ptr_compatible_conversion<void, T, void>))
                                  ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4556:22: note: explicit constructor is not a candidate
  constexpr explicit basic_result(T &&o,
                     ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4566:22: note: explicit constructor is not a candidate
  constexpr explicit basic_result(
                     ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4579:22: note: explicit constructor is not a candidate
  constexpr explicit basic_result(
                     ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4592:22: note: explicit constructor is not a candidate
  constexpr explicit basic_result(const basic_result<T, U, V> &o,
                     ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4605:22: note: explicit constructor is not a candidate
  constexpr explicit basic_result(basic_result<T, U, V> &&o,
                     ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4618:22: note: explicit constructor is not a candidate
  constexpr explicit basic_result(const basic_result<T, U, V> &o,
                     ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4631:22: note: explicit constructor is not a candidate
  constexpr explicit basic_result(basic_result<T, U, V> &&o,
                     ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4644:22: note: explicit constructor is not a candidate
  constexpr explicit basic_result(in_place_type_t<value_type_if_enabled> _, Args &&... args) noexcept(detail::is_nothrow_constructible<value_type, Args...>)
                     ^
/opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:4665:22: note: explicit constructor is not a candidate
  constexpr explicit basic_result(in_place_type_t<error_type_if_enabled> _, Args &&... args) noexcept(detail::is_nothrow_constructible<error_type, Args...>)
                     ^
In file included from /app/main.cpp:3:
In file included from /app/EngineCode.hpp:2:
In file included from /opt/compiler-explorer/libs/outcome/single-header/outcome-experimental.hpp:6508:
In file included from /opt/compiler-explorer/gcc-12.2.0/lib/gcc/x86_64-linux-gnu/12.2.0/../../../../include/c++/12.2.0/atomic:41:
In file included from /opt/compiler-explorer/gcc-12.2.0/lib/gcc/x86_64-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/atomic_base.h:41:
In file included from /opt/compiler-explorer/gcc-12.2.0/lib/gcc/x86_64-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/atomic_wait.h:49:
In file included from /opt/compiler-explorer/gcc-12.2.0/lib/gcc/x86_64-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/std_mutex.h:39:
In file included from /opt/compiler-explorer/gcc-12.2.0/lib/gcc/x86_64-linux-gnu/12.2.0/../../../../include/c++/12.2.0/system_error:41:
In file included from /opt/compiler-explorer/gcc-12.2.0/lib/gcc/x86_64-linux-gnu/12.2.0/../../../../include/c++/12.2.0/stdexcept:39:
In file included from /opt/compiler-explorer/gcc-12.2.0/lib/gcc/x86_64-linux-gnu/12.2.0/../../../../include/c++/12.2.0/string:41:
In file included from /opt/compiler-explorer/gcc-12.2.0/lib/gcc/x86_64-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/allocator.h:46:
...
@frkami123
Copy link
Author

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.

@ned14
Copy link
Owner

ned14 commented Jul 20, 2023

Alas it does not surprise me clang 16 has issues :(

@ned14
Copy link
Owner

ned14 commented Jun 14, 2024

clang 18 has considerably improved QoI since 16, so if your issue repros in clang 18 please do reopen this issue.

@ned14 ned14 closed this as completed Jun 14, 2024
@frkami123
Copy link
Author

@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.

@ned14
Copy link
Owner

ned14 commented Aug 7, 2024

Ok, reopened. Does this issue appear if using Boost.Outcome instead of standalone Outcome?

@ned14 ned14 reopened this Aug 7, 2024
@frkami123
Copy link
Author

frkami123 commented Aug 7, 2024

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.

C:\Users\###>E:\common\LLVM\bin\clang-cl.exe --version
clang version 18.1.6
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: E:\common\LLVM\bin

compiler output output

[main] Building folder: E:/common/outcome_bug/__out/build/windows-clangcl-debug 
[build] Starting build
[proc] Executing command: cmake.exe --build E:/common/outcome_bug/__out/build/windows-clangcl-debug --parallel 6 --target test --
[build] [1/2] Building CXX object CMakeFiles\test.dir\main.cpp.obj
[build] FAILED: CMakeFiles/test.dir/main.cpp.obj 
[build] E:\common\LLVM\bin\clang-cl.exe  /nologo -TP  -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\config\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\exception\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\assert\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\core\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\static_assert\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\throw_exception\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\smart_ptr\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\move\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\type_traits\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\tuple\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\system\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\variant2\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\mp11\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\winapi\include -IE:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\predef\include /EHsc /Ob0 /Od /RTC1 -std:c++20 -MDd -Zi /EHsc /showIncludes /FoCMakeFiles\test.dir\main.cpp.obj /FdCMakeFiles\test.dir\ -c -- E:\common\outcome_bug\main.cpp
[build] E:\common\outcome_bug\main.cpp(21,12): error: no viable conversion from returned value of type 'failure_type<std::decay_t<status_code<SystemStatusDomain>>>' (aka 'failure_type<system_error2::status_code<Eao::SystemStatusDomain>>') to function return type 'Result<void, EngineStatus>' (aka 'basic_result<void, system_error2::status_code<Eao::EngineStatusDomain>, boost::outcome_v2::experimental::policy::all_narrow>')
[build]    21 |     return result.as_failure();
[build]       |            ^~~~~~~~~~~~~~~~~~~
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(376,3): note: candidate constructor not viable: no known conversion from 'failure_type<std::decay_t<status_code<SystemStatusDomain>>>' (aka 'failure_type<system_error2::status_code<Eao::SystemStatusDomain>>') to 'basic_result<void, status_code<EngineStatusDomain>, all_narrow> &&' for 1st argument
[build]   376 |   basic_result(basic_result && /*unused*/) = default;  // NOLINT
[build]       |   ^            ~~~~~~~~~~~~~~~
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(380,3): note: candidate constructor not viable: no known conversion from 'failure_type<std::decay_t<status_code<SystemStatusDomain>>>' (aka 'failure_type<system_error2::status_code<Eao::SystemStatusDomain>>') to 'const basic_result<void, status_code<EngineStatusDomain>, all_narrow> &' for 1st argument
[build]   380 |   basic_result(const basic_result & /*unused*/) = default;
[build]       |   ^            ~~~~~~~~~~~~~~~~~~~~
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(589,13): note: candidate constructor not viable: no known conversion from 'failure_type<std::decay_t<status_code<SystemStatusDomain>>>' (aka 'failure_type<system_error2::status_code<Eao::SystemStatusDomain>>') to 'const success_type<void> &' for 1st argument
[build]   589 |   constexpr basic_result(const success_type<void> &o) noexcept(std::is_nothrow_default_constructible<value_type>::value)  // NOLINT
[build]       |             ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(396,3): note: candidate template ignored: requirement '!predicate::constructors_enabled' was not satisfied [with Arg = failure_type<std::decay_t<status_code<SystemStatusDomain>>>, Args = <>]
[build]   396 |   basic_result(Arg && /*unused*/, Args &&... /*unused*/) = delete;  // NOLINT basic_result<T, T> is NOT SUPPORTED, see docs!
[build]       |   ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(404,3): note: candidate template ignored: requirement '!predicate::implicit_constructors_enabled' was not satisfied [with T = failure_type<std::decay_t<status_code<SystemStatusDomain>>>]
[build]   404 |   basic_result(T && /*unused*/, implicit_constructors_disabled_tag /*unused*/ = implicit_constructors_disabled_tag()) =
[build]       |   ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(412,13): note: candidate template ignored: requirement 'predicate::enable_value_converting_constructor<boost::outcome_v2::failure_type<system_error2::status_code<Eao::SystemStatusDomain>, void>>' was not satisfied [with T = failure_type<std::decay_t<status_code<SystemStatusDomain>>>]
[build]   412 |   constexpr basic_result(T &&t, value_converting_constructor_tag /*unused*/ = value_converting_constructor_tag()) noexcept(
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(423,13): note: candidate template ignored: requirement 'predicate::enable_error_converting_constructor<boost::outcome_v2::failure_type<system_error2::status_code<Eao::SystemStatusDomain>, void>>' was not satisfied [with T = failure_type<std::decay_t<status_code<SystemStatusDomain>>>]
[build]   423 |   constexpr basic_result(T &&t, error_converting_constructor_tag /*unused*/ = error_converting_constructor_tag()) noexcept(
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(435,13): note: candidate template ignored: substitution failure [with ErrorCondEnum = failure_type<std::decay_t<status_code<SystemStatusDomain>>>]: no matching function for call to 'make_error_code'
[build]   433 |   BOOST_OUTCOME_TREQUIRES(BOOST_OUTCOME_TEXPR(error_type(make_error_code(ErrorCondEnum()))),  //
[build]       |                                                          ~~~~~~~~~~~~~~~
[build]   434 |                     BOOST_OUTCOME_TPRED(predicate::template enable_error_condition_converting_constructor<ErrorCondEnum>))
[build]   435 |   constexpr basic_result(ErrorCondEnum &&t, error_condition_converting_constructor_tag /*unused*/ = error_condition_converting_constructor_tag()) noexcept(
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(600,13): note: candidate template ignored: could not match 'success_type' against 'failure_type'
[build]   600 |   constexpr basic_result(const success_type<T> &o) noexcept(detail::is_nothrow_constructible<value_type, T>)  // NOLINT
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(611,13): note: candidate template ignored: could not match 'success_type' against 'failure_type'
[build]   611 |   constexpr basic_result(success_type<T> &&o) noexcept(detail::is_nothrow_constructible<value_type, T>)  // NOLINT
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(622,13): note: candidate template ignored: requirement 'predicate::enable_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' was not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
[build]   622 |   constexpr basic_result(const failure_type<T> &o, explicit_compatible_copy_conversion_tag /*unused*/ = explicit_compatible_copy_conversion_tag()) noexcept(
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(634,13): note: candidate template ignored: requirement 'predicate::enable_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' was not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
[build]   634 |   constexpr basic_result(failure_type<T> &&o, explicit_compatible_move_conversion_tag /*unused*/ = explicit_compatible_move_conversion_tag()) noexcept(
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(646,13): note: candidate template ignored: requirement 'predicate::enable_make_error_code_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' was not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
[build]   646 |   constexpr basic_result(const failure_type<T> &o,
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(659,13): note: candidate template ignored: requirement 'predicate::enable_make_error_code_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' was not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
[build]   659 |   constexpr basic_result(failure_type<T> &&o,
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(672,13): note: candidate template ignored: requirement 'predicate::enable_make_exception_ptr_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' was not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
[build]   672 |   constexpr basic_result(const failure_type<T> &o,
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(685,13): note: candidate template ignored: requirement 'predicate::enable_make_exception_ptr_compatible_conversion<void, system_error2::status_code<Eao::SystemStatusDomain>, void>' was not satisfied [with T = system_error2::status_code<Eao::SystemStatusDomain>]
[build]   685 |   constexpr basic_result(failure_type<T> &&o,
[build]       |             ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(448,22): note: explicit constructor is not a candidate
[build]   448 |   constexpr explicit basic_result(T &&o,
[build]       |                      ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(458,22): note: explicit constructor is not a candidate
[build]   458 |   constexpr explicit basic_result(
[build]       |                      ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(471,22): note: explicit constructor is not a candidate
[build]   471 |   constexpr explicit basic_result(
[build]       |                      ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(484,22): note: explicit constructor is not a candidate
[build]   484 |   constexpr explicit basic_result(const basic_result<T, U, V> &o,
[build]       |                      ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(497,22): note: explicit constructor is not a candidate
[build]   497 |   constexpr explicit basic_result(basic_result<T, U, V> &&o,
[build]       |                      ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(510,22): note: explicit constructor is not a candidate
[build]   510 |   constexpr explicit basic_result(const basic_result<T, U, V> &o,
[build]       |                      ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(523,22): note: explicit constructor is not a candidate
[build]   523 |   constexpr explicit basic_result(basic_result<T, U, V> &&o,
[build]       |                      ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(537,22): note: explicit constructor is not a candidate
[build]   537 |   constexpr explicit basic_result(in_place_type_t<value_type_if_enabled> _, Args &&... args) noexcept(detail::is_nothrow_constructible<value_type, Args...>)
[build]       |                      ^
[build] E:\common\cpm_cache\boost\80a5ef5334f06669c0e7cf2cb15a920ab5f88ea2\libs\outcome\include\boost/outcome/experimental\../basic_result.hpp(558,22): note: explicit constructor is not a candidate
[proc] The command: cmake.exe --build E:/common/outcome_bug/__out/build/windows-clangcl-debug --parallel 6 --target test -- exited with code: 1
[build]   558 |   constexpr explicit basic_result(in_place_type_t<error_type_if_enabled> _, Args &&... args) noexcept(detail::is_nothrow_constructible<error_type, Args...>)
[build]       |                      ^
[build] 1 error generated.
[build] ninja: build stopped: subcommand failed.
[driver] Build completed: 00:00:01.567
[build] Build finished with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants