We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
std::convertible_to evaluates to false for same types of rd::expected<void, E>
Checked on: msvc (cl 19.35.32215) /std:c++20 clang (15.0.0) -std=c++20
Some code to explain below: godbolt clang 15 - issue 1
#include <concepts> #include <system_error> #include <rd/expected.hpp> template <typename T> using result = rd::expected<T, std::error_code>; static_assert(std::convertible_to<result<std::size_t>, result<int>>); // successfully, ok static_assert(std::convertible_to<result<void>, result<void>>); // failure, why?
Second assertion failed, Why can't identical rd::expected types be converted to each other? Is there a semantic reason for this behavior?
It may be related to another issue: godbolt clang 15 - issue 2
#include <system_error> #include <concepts> #include <span> #include <variant> #include <rd/expected.hpp> template <typename T> using result = rd::expected<T, std::error_code>; template <typename T> using raw_result = std::variant<T, rd::unexpected<std::error_code>>; struct data_header { std::size_t data_length; static raw_result<data_header> from_buffer(std::span<std::byte> buffer) noexcept; // compile }; struct tpkt_header { std::size_t length; static result<tpkt_header> from_buffer(std::span<std::byte> buffer) noexcept; // won't compile };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
std::convertible_to evaluates to false for same types of rd::expected<void, E>
Checked on:
msvc (cl 19.35.32215) /std:c++20
clang (15.0.0) -std=c++20
Some code to explain below:
godbolt clang 15 - issue 1
Second assertion failed, Why can't identical rd::expected types be converted to each other? Is there a semantic reason for this behavior?
It may be related to another issue:
godbolt clang 15 - issue 2
The text was updated successfully, but these errors were encountered: