diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-03 14:09:53 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-03 14:14:52 (GMT) |
commit | c13656e7173a517961349a5fe20ce0f727d37568 (patch) | |
tree | 0462c0bcb7ea8e827efef61bd6f1b02275282d12 /Tests/CompileFeatures/genex_test.cpp | |
parent | 3e34e8331a72f227248a235595e3cfeabf65312e (diff) | |
download | CMake-c13656e7173a517961349a5fe20ce0f727d37568.zip CMake-c13656e7173a517961349a5fe20ce0f727d37568.tar.gz CMake-c13656e7173a517961349a5fe20ce0f727d37568.tar.bz2 |
Features: Test nullptr as a side-effect activation of static_assert.
Because not all compilers under test support the existing 'activation
features', add another test to ensure that compilers which support
both static_assert and nullptr behave as expected in this test.
Diffstat (limited to 'Tests/CompileFeatures/genex_test.cpp')
-rw-r--r-- | Tests/CompileFeatures/genex_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp index 46b1942..f667cc4 100644 --- a/Tests/CompileFeatures/genex_test.cpp +++ b/Tests/CompileFeatures/genex_test.cpp @@ -17,6 +17,17 @@ struct B final : A #endif +#if !HAVE_NULLPTR +#error "Expect nullptr feature" +#else + +const char* getString() +{ + return nullptr; +} + +#endif + int main() { |