CM_OVERRIDE: fix feature test for clang

Clang refuses to default initialize an instance of a class that does not
have a default constructor.  Fix the check by adding default
constructors.  Don't use brace initialization like it is proposed in the
error message.  We want to test the override support independent from
the support for brace initialization.
This commit is contained in:
Daniel Pfeifer 2016-06-29 11:33:31 +02:00
parent b9b3ec4d98
commit 3f77655d06
1 changed files with 2 additions and 0 deletions

View File

@ -1,11 +1,13 @@
struct Foo struct Foo
{ {
Foo() {}
virtual ~Foo() {} virtual ~Foo() {}
virtual int test() const = 0; virtual int test() const = 0;
}; };
struct Bar : Foo struct Bar : Foo
{ {
Bar() {}
~Bar() override {} ~Bar() override {}
int test() const override { return 0; } int test() const override { return 0; }
}; };