-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Labels
c++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 conceptsconfirmedVerified by a second partyVerified by a second partycrash-on-invalid
Description
The following code hits an assertion from diagnoseWellFormedUnsatisfiedConstraintExpr
:
template <typename _Iterator> class normal_iterator {};
/// is_convertible
template <typename From, typename To> struct is_convertible {};
template <typename From, typename To>
inline constexpr bool is_convertible_v = is_convertible<From, To>::value;
template <typename From, typename To>
concept convertible_to = is_convertible_v<From, To>;
template <typename IteratorL, typename IteratorR>
requires requires(IteratorL __lhs, IteratorR __rhs) {
{ __lhs == __rhs } -> convertible_to<bool>;
}
constexpr bool operator==(normal_iterator<IteratorL> __lhs,
normal_iterator<IteratorR> __rhs) {
return __lhs.base() == __rhs.base();
}
template <typename T> struct Vector {
normal_iterator<T> begin() const { return {}; }
normal_iterator<T> end() const { return {}; }
};
class Object;
void function(Vector<Object *> objects) { objects.begin() == objects.end(); }
https://clang.godbolt.org/z/evchKETWq
See clangd/clangd#1726 for analysis.
Metadata
Metadata
Assignees
Labels
c++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 conceptsconfirmedVerified by a second partyVerified by a second partycrash-on-invalid
Type
Projects
Status
Done