Bug 99597 - Parameter packs not expanded in lambda template list
Summary: Parameter packs not expanded in lambda template list
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: c++-lambda, rejects-valid
Depends on:
Blocks:
 
Reported: 2021-03-15 12:13 UTC by 康桓瑋
Modified: 2022-11-02 00:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 康桓瑋 2021-03-15 12:13:28 UTC
The following code intends to work, even if it fails in three major compilers:

template <typename... Ts> 
void f(Ts...) {
  ([]<Ts>(){}, ...);  
}

int main() { f(0, 0.5); }

(goldbot: https://godbolt.org/z/xnM9dY)