[Bug c++/104358] Assignable template lambda as function parameter is incorrectly reduced to type of "int"

2022-02-05 Thread nickhuang99 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104358 --- Comment #2 from qingzhe huang --- Here are more tests (https://www.godbolt.org/z/5qc8jTGa8) to show that only msvc is giving the correct result. It just illustrates the use cases of this definition and why it should be allowed. 1. By

[Bug c++/104358] Assignable template lambda as function parameter is incorrectly reduced to type of "int"

2022-02-03 Thread nickhuang99 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104358 --- Comment #1 from qingzhe huang --- Sorry about the long description and here is the short version to highlight the core issue. Given this template function with a templated lambda as parameter: template using Lambda=decltype(+[](T){});