-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Assertion !isValueDependent() && "Expression evaluator can't be called on a dependent expression."
failed
#136118
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
Comments
@llvm/issue-subscribers-clang-frontend Author: None (MacroModel)
```cpp
#include <cstddef>
#include <utility>
#include <type_traits>
template <typename... Fs>
inline consteval bool allow_multi_result_vector() noexcept
{
return[]<::std::size_t... I>(::std::index_sequence<I...>) constexpr noexcept
{
return ((
[]<typename FsCurr>() constexpr noexcept
-> bool
{
// check irreplaceable
if constexpr (requires { requires ::std::same_as<::std::remove_cvref_t<decltype(FsCurr::allow_multi_result_vector)>, bool>; })
{
constexpr bool tallow{ FsCurr::allow_multi_result_vector };
return tallow;
}
else { return false; }
}.template operator() < Fs...[I] > ()) ||
...);
}(::std::make_index_sequence<sizeof...(Fs)>{});
}
struct A struct B int main()
|
Confirmed: https://godbolt.org/z/f4xYYobKs
|
!isValueDependent() && "Expression evaluator can't be called on a dependent expression."
failed
Reduced by me and C-Reduce: https://godbolt.org/z/4esWerzK5 template <typename... Fs>
consteval int allow_multi_result_vector() {
[] <int... I> {
([]<typename FsCurr> {
requires {
requires __is_same(decltype(FsCurr::allow_multi_result_vector), int);
};
}.template operator()<Fs...[I]>() ||
...);
};
}
template int allow_multi_result_vector<>(); |
CC @cor3ntin |
Reduced further: template <typename Fs>
int allow_multi_result_vector() {
([]<typename FsCurr> {
requires {
requires __is_same(decltype(FsCurr::allow_multi_result_vector), int);
};
}.template operator()<Fs>());
}
template int allow_multi_result_vector<int>(); https://godbolt.org/z/PrjfWY8x1 This is unrelated to pack indexing but rather deferred constraint evaluation: the requires expressions remain untransformed until the final instantiation, at which point we sadly don't have full-level template arguments to go with. |
Hmm, seems to be a Clang 16 regression: https://godbolt.org/z/MeYe1ox73 |
There are a lot w/ this same assertion but the backtraces are all a little different, this one though seems similar enough to maybe be related: #94811 |
git bisect points to 13d44a8 which is a revert unfortunately |
The text was updated successfully, but these errors were encountered: