forked from OSchip/llvm-project
Improve the test coverage for std::is_base_of
llvm-svn: 360911
This commit is contained in:
parent
daa91492dd
commit
402ca78c43
|
@ -39,6 +39,7 @@ struct B {};
|
|||
struct B1 : B {};
|
||||
struct B2 : B {};
|
||||
struct D : private B1, private B2 {};
|
||||
struct I0; // incomplete
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
|
@ -54,5 +55,19 @@ int main(int, char**)
|
|||
test_is_not_base_of<B[3], D[3]>();
|
||||
test_is_not_base_of<int, int>();
|
||||
|
||||
// A scalar is never the base class of anything (including incomplete types)
|
||||
test_is_not_base_of<int, B>();
|
||||
test_is_not_base_of<int, B1>();
|
||||
test_is_not_base_of<int, B2>();
|
||||
test_is_not_base_of<int, D>();
|
||||
test_is_not_base_of<int, I0>();
|
||||
|
||||
// A scalar never has base classes (including incomplete types)
|
||||
test_is_not_base_of<B, int>();
|
||||
test_is_not_base_of<B1, int>();
|
||||
test_is_not_base_of<B2, int>();
|
||||
test_is_not_base_of<D, int>();
|
||||
test_is_not_base_of<I0, int>();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue