has_trivial_copy_constructor hooked up to clang. Filed http://llvm.org/bugs/show_bug.cgi?id=8105 to take care of void, arrays of incomplete bounds and complete bounds which don't work yet. If there is some reason we don't want to handle these types in the compiler, I can handle them in the library.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -37,6 +37,7 @@ class Empty
|
||||
|
||||
class NotEmpty
|
||||
{
|
||||
public:
|
||||
virtual ~NotEmpty();
|
||||
};
|
||||
|
||||
@@ -49,6 +50,7 @@ struct bit_zero
|
||||
|
||||
class Abstract
|
||||
{
|
||||
public:
|
||||
virtual ~Abstract() = 0;
|
||||
};
|
||||
|
||||
@@ -61,17 +63,17 @@ int main()
|
||||
{
|
||||
test_has_not_trivial_copy_constructor<void>();
|
||||
test_has_not_trivial_copy_constructor<A>();
|
||||
test_has_not_trivial_copy_constructor<int&>();
|
||||
test_has_not_trivial_copy_constructor<char[3]>();
|
||||
test_has_not_trivial_copy_constructor<char[]>();
|
||||
test_has_not_trivial_copy_constructor<Abstract>();
|
||||
test_has_not_trivial_copy_constructor<NotEmpty>();
|
||||
|
||||
test_has_trivial_copy_constructor<int&>();
|
||||
test_has_trivial_copy_constructor<Union>();
|
||||
test_has_trivial_copy_constructor<Abstract>();
|
||||
test_has_trivial_copy_constructor<Empty>();
|
||||
test_has_trivial_copy_constructor<int>();
|
||||
test_has_trivial_copy_constructor<double>();
|
||||
test_has_trivial_copy_constructor<int*>();
|
||||
test_has_trivial_copy_constructor<const int*>();
|
||||
test_has_trivial_copy_constructor<char[3]>();
|
||||
test_has_trivial_copy_constructor<char[3]>();
|
||||
test_has_trivial_copy_constructor<NotEmpty>();
|
||||
test_has_trivial_copy_constructor<bit_zero>();
|
||||
}
|
||||
|
Reference in New Issue
Block a user