http://llvm.org/bugs/show_bug.cgi?id=8105
Summary: __has_trivial_copy does not work with void, arrays
with incomplete or complete bounds
Product: clang
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
I expect all three of the following tests to fail:
#include <type_traits>
template <class T>
void
test()
{
T t(std::declval<const T&>());
}
int main()
{
test<void>();
test<int[3]>();
test<int[]>();
}
I therefore expect all of __has_trivial_copy(void), __has_trivial_copy(int[3]),
and __has_trivial_copy(int[]) to return false:
template <class T, bool Result>
void
test__has_trivial_copy()
{
static_assert(__has_trivial_copy(T) == Result, "");
}
int main()
{
test__has_trivial_copy<void, false>();
test__has_trivial_copy<int[3], false>();
test__has_trivial_copy<int[], false>();
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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