-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issueneeds-reductionLarge reproducer that should be reduced into a simpler formLarge reproducer that should be reduced into a simpler form
Description
Clang (and other compilers too) compile when this code uses ::value
but fail to compile when _v
is used (https://godbolt.org/z/b9ofY1vsT):
template<typename T>
concept check1 = requires {
[]<std::size_t... Is>(std::index_sequence<Is...>) requires requires {
(std::get<Is>(std::declval<T>()), ...);
} {}(std::make_index_sequence<std::tuple_size<T>::value>{}); // diff
};
template<typename T>
concept check2 = requires {
[]<std::size_t... Is>(std::index_sequence<Is...>) requires requires {
(std::get<Is>(std::declval<T>()), ...);
} {}(std::make_index_sequence<std::tuple_size_v<T>>{}); // diff
};
int main() {
auto _ = check1<int>; // this is fine
auto _ = check2<int>; // this is not
}
Is this behaviour correct?
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issueneeds-reductionLarge reproducer that should be reduced into a simpler formLarge reproducer that should be reduced into a simpler form