[Bug c++/85866] [8 Regression] too few arguments to function when sfinae on calling pointer to member function

gufideg at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue May 22 04:08:00 GMT 2018


--- Comment #1 from Guillaume Racicot <gufideg at gmail dot com> ---
I tried some similar cases, and It seems it only happens when the expression
`(std::declval<U>().*std::declval<V>())()` is inside template parameters. In
the return type and normal function parameter it works as usual:

    #include <utility>

    using void_t = void;

    template<typename U, typename V>
    )> boom(){}

    struct Foo {
        void bar(){}

    int main() {
        boom<Foo, decltype(&Foo::bar)>();

Live example: https://godbolt.org/g/vTE9Sr

More information about the Gcc-bugs mailing list