-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed as duplicate of#84372
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicateResolved as duplicate
Description
Suppose we use the feature test macro to only use pack indexing when available
template <std::size_t N, typename... Args>
constexpr auto my_element(Args... args) {
#if __cpp_pack_indexing >= 202311L
return args...[N];
#else
// Do something else
#endif
}
A compiler warning is emitted when compiling for C++23 or earlier
<source>:13:16: warning: pack indexing is a C++2c extension [-Wc++26-extensions]
13 | return args...[N];
| ^
1 warning generated.
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicateResolved as duplicate