http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48735
Summary: [C++0x][SFINAE] Hard errors with array
list-construction and deleted default c'tor
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
gcc 4.7.0 20110422 (experimental) in C++0x mode rejects the following code:
//-------------------------
template<class T,
class = decltype(T{})
>
char f(int);
template<class>
char (&f(...))[2];
struct ND { ND() = delete; };
static_assert(sizeof(f<ND[1]>(0)) != 1, "Error");
//-------------------------
"error: use of deleted function ‘ND::ND()’"
The code should be accepted.