The compiler would judge two concepts is same by their addresses. However, when we use modules, the addresses wouldn't be the same all the time since one is parsed in their TU and another is imported in another TU. This patch fixes this by using isSameEntity to judge the two concepts. Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D114769
14 lines
171 B
C++
14 lines
171 B
C++
#ifndef FOO_H
|
|
#define FOO_H
|
|
|
|
template <class T>
|
|
concept Range = requires(T &t) { t.begin(); };
|
|
|
|
struct A {
|
|
public:
|
|
template <Range T>
|
|
using range_type = T;
|
|
};
|
|
|
|
#endif
|