<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - result of passing an array of unknown bound to is_destructible is wrong"
   href="http://llvm.org/bugs/show_bug.cgi?id=16839">16839</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>result of passing an array of unknown bound to is_destructible is wrong
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>hhinnant@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>y121516@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Testing code is as follows:


#include<type_traits>
static_assert(std::is_destructible<int[]>::value == false, "");
int main(){};



compile error message is as follow:


prog.cc:2:1: error: static_assert failed ""
static_assert(std::is_destructible<int[]>::value == false, "");
^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.



On the other hand Standard (§ 20.9.4.3 Table 49 — Type property predicates)
says:

Template

template <class T>
struct is_destructible;


Condition

For a complete type T and
given
template <class U>
struct test { U u; };,
test<T>::˜test() is not
deleted.


Preconditions

T shall be a complete type,
(possibly cv-qualified)
void, or an array of
unknown bound.



An array of unknown bound is incomplete type (§ 3.9).
So, I think that std::is_destructible<int[]> should be derived from false_type.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>