forked from OSchip/llvm-project
[libc++] Workaround failures with modules on Clang ToT
This commit is contained in:
parent
63cc251eb9
commit
6afd6e96ce
|
@ -178,6 +178,9 @@ public:
|
|||
|
||||
_LIBCPP_UNREACHABLE();
|
||||
}
|
||||
|
||||
// TODO: Remove this workaround for broken Clang modules.
|
||||
using __function_like::operator&;
|
||||
};
|
||||
|
||||
inline constexpr auto advance = __advance_fn(__function_like::__tag());
|
||||
|
|
|
@ -68,6 +68,9 @@ struct __next_fn final : private __function_like {
|
|||
ranges::advance(__x, __n, __bound);
|
||||
return __x;
|
||||
}
|
||||
|
||||
// TODO: Remove this workaround for broken Clang modules.
|
||||
using __function_like::operator&;
|
||||
};
|
||||
|
||||
inline constexpr auto next = __next_fn(__function_like::__tag());
|
||||
|
|
|
@ -61,6 +61,9 @@ struct __prev_fn final : private __function_like {
|
|||
ranges::advance(__x, -__n, __bound);
|
||||
return __x;
|
||||
}
|
||||
|
||||
// TODO: Remove this workaround for broken Clang modules.
|
||||
using __function_like::operator&;
|
||||
};
|
||||
|
||||
inline constexpr auto prev = __prev_fn(__function_like::__tag());
|
||||
|
|
|
@ -17,7 +17,7 @@ constexpr bool is_addressable = requires(T t) {
|
|||
};
|
||||
|
||||
template <class T>
|
||||
[[nodiscard]] constexpr bool is_function_like() {
|
||||
constexpr bool is_function_like() {
|
||||
using X = std::remove_cvref_t<T>;
|
||||
static_assert(!is_addressable<X>);
|
||||
static_assert(!is_addressable<X const>);
|
||||
|
|
Loading…
Reference in New Issue