[Bug c++/123290] Internal compiler error when lambda is used as template argument
blubban at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 24 22:15:29 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123290
--- Comment #2 from Alfred Agrell <blubban at gmail dot com> ---
Testcase reduction complete, the non-const lvalue reference things disappeared
during reduction (there's probably an accepts-invalid or rejects-valid nearby
as well)
https://godbolt.org/z/v5zM1E8se
template<typename T>
class identity {
public:
using type = T;
};
template <auto kLambda>
class FlatMapHelper {};
template <int=1>
auto Adapter() {
using OutputType = FlatMapHelper<[]<int>(){}>;
[]<int=0>() {
using T = identity<OutputType>::type;
}();
}
int main() {
Adapter();
}
More information about the Gcc-bugs
mailing list