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

Tom de Geus <tom at geus dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tom at geus dot me

--- Comment #6 from Tom de Geus <tom at geus dot me> ---
I can confirm that this bug is still there, e.g. on the standard gcc on the
latest Ubuntu. Clang and MSVS are compiling fine. 

Here is my failing (similar) problem:

```cpp
#include <iostream>
#include <vector>

template <class T>
auto foo(const T* A)
{
    return A[0];
}

template <class T>
struct impl
{
    template <typename F>
    static auto bar(const T& A, F func)
    {
        return func(&A[0]);
    }
};

int main()
{
    std::vector<size_t> A = {20, 3, 4};

    std::cout << impl<decltype(A)>::bar(A, &foo<size_t>) << std::endl;

    return 0;
}
```

See
https://stackoverflow.com/questions/65183976/infer-template-argument-for-pointer-to-function/65186031#65186031

Reply via email to