This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85866] New: [8 Regression] too few arguments to function when sfinae on calling pointer to member function
- From: "gufideg at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 May 2018 03:44:56 +0000
- Subject: [Bug c++/85866] New: [8 Regression] too few arguments to function when sfinae on calling pointer to member function
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85866
Bug ID: 85866
Summary: [8 Regression] too few arguments to function when
sfinae on calling pointer to member function
Product: gcc
Version: 8.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gufideg at gmail dot com
Target Milestone: ---
This code fails under GCC 8:
#include <utility>
template<typename...>
using void_t = void;
template<typename U, typename V,
void_t<decltype(
(std::declval<U>().*std::declval<V>())()
)>* = nullptr>
void boom(){}
struct Foo {
void bar(){}
};
int main() {
boom<Foo, decltype(&Foo::bar)>();
}
This particular code compiles on all other GCC versions since 4.7
It also compiles on all versions of clang since version 3.4
Live example: https://godbolt.org/g/viHnMn