diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-29 09:33:31 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-29 09:33:38 (GMT) |
commit | 3f77655d060ae48fabd9dc5c445cad813a70db42 (patch) | |
tree | 0d88623bd75738b0e78a407094c46a8bddb0afe6 /Source/Checks | |
parent | b9b3ec4d98b03c180b2e6b9ad8edba7f75576353 (diff) | |
download | CMake-3f77655d060ae48fabd9dc5c445cad813a70db42.zip CMake-3f77655d060ae48fabd9dc5c445cad813a70db42.tar.gz CMake-3f77655d060ae48fabd9dc5c445cad813a70db42.tar.bz2 |
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.
Diffstat (limited to 'Source/Checks')
-rw-r--r-- | Source/Checks/cm_cxx_override.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Checks/cm_cxx_override.cxx b/Source/Checks/cm_cxx_override.cxx index e196968..5a33fbb 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; } }; |