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

sd.foolegg at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #3 from sd.foolegg at gmail dot com ---
(In reply to Jonathan Wakely from comment #1)
> Not a bug, the parameter pack for std::function<void(Ts...)> cannot be
> deduced from the arguments, because a function pointer is not a
> std::function.

why below code can run?:

template<typename ... Ts>
struct Invoker {
    void invoke(std::function<void(Ts ...)> f, Ts ... args) {
        f(args ...);
    }
};

Invoker<std::string, int> invoker;
    invoker.invoke(foo, "a", 1); // ok

and visual studio 2015 can deduce parameter pack normally (same code).

Reply via email to