-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Improve the __is_derived_from_optional
concept
#63530
Comments
@llvm/issue-subscribers-clang-modules |
Note that the original reproducer is invalid without modules: https://godbolt.org/z/5aojvWcYW |
It turns out the reason for the issue is the same with that we don't merge the lambdas in modules well: llvm-project/libcxx/include/optional Lines 682 to 683 in dc6f5c9
If we change the implementation of Also personally I feel it looks better to use |
Thanks, it seems I was a bit to aggressive removing code, https://godbolt.org/z/h5MxnxhYT works without modules and looks more like the original code. Thanks for finding the issue. I will investigate whether we can indeed use I'll assign this to myself to keep track of it. |
__is_derived_from_optional
concept
BTW, I'll track the issue in the compiler side in #63544 |
I had a look and both |
Tested with
Clang version 17.0.0 (++20230624042319+ee2bf319bc05-1~exp1~20230624042420.1017)
The issue looks similar to #62943 but that fix is this version of Clang. Testing this code with libc++'s
std
moduleGives the following compiler output
This is a manual reduction of the file
libcxx/test/std/utilities/optional/optional.comp_with_t/compare.three_way.pass.cpp
The text was updated successfully, but these errors were encountered: