https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89429

--- Comment #1 from Valentin <vakevk at gmail dot com> ---
Sorry, this was the wrong attachment.

The proper code is:


template <typename Function>
void f(Function&& function) {
    // `0` is not special. Can be any value of any type.
    function(0);
}

// No error when this template parameter is removed.
template<typename T>
void g() {
    // Must be `auto`.
    f([](auto) {
        __func__;
    });
}

void h() {
    // `int` is not special. Can be any type. 
    g<int>();
}

Reply via email to