https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85866
--- 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> template<typename...> using void_t = void; template<typename U, typename V> void_t<decltype( (std::declval<U>().*std::declval<V>())() )> boom(){} struct Foo { void bar(){} }; int main() { boom<Foo, decltype(&Foo::bar)>(); } Live example: https://godbolt.org/g/vTE9Sr