http://llvm.org/bugs/show_bug.cgi?id=16839

            Bug ID: 16839
           Summary: result of passing an array of unknown bound to
                    is_destructible is wrong
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to