From 3f77655d060ae48fabd9dc5c445cad813a70db42 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Wed, 29 Jun 2016 11:33:31 +0200 Subject: [PATCH] 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. --- Source/Checks/cm_cxx_override.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Checks/cm_cxx_override.cxx b/Source/Checks/cm_cxx_override.cxx index e1969684d..5a33fbb78 100644 --- a/Source/Checks/cm_cxx_override.cxx +++ b/Source/Checks/cm_cxx_override.cxx @@ -1,11 +1,13 @@ struct Foo { + Foo() {} virtual ~Foo() {} virtual int test() const = 0; }; struct Bar : Foo { + Bar() {} ~Bar() override {} int test() const override { return 0; } };