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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The first testcase does fail to compile, but for the wrong reason:

e.cc: In instantiation of ‘typename enable_if<_Array, decltype (delete [] 
ck_delete::__p)>::type ck_delete(_Yp*) [with bool _Array = true; _Yp = A;
typename enable_if<_Array, decltype (delete []  ck_delete::__p)>::type =
void]’:
e.cc:23:12:   required from here
e.cc:15:5: error: use of deleted function ‘static void A::operator delete
[](void*)’
   { delete[] __p; }
     ^~~~~~
e.cc:19:8: note: declared here
   void operator delete[](void*) = delete;
        ^~~~~~~~


The function template shouldn't even be instantiated, because the signature
should have a substitution failure.

Reply via email to