1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-17 07:11:52 +08:00

WCDH: introduce BARE_FEATURES

This allows defining compat versions of some C/C++ features with the name of the
keyword itself, so all code can look as if it was written for the new language
standard.
This commit is contained in:
Rolf Eike Beer
2018-03-19 21:42:25 +01:00
parent 561238bb6f
commit f38d050231
5 changed files with 127 additions and 34 deletions

View File

@@ -0,0 +1,23 @@
#include "test_compiler_detection_bare_features.h"
class base
{
public:
virtual ~base() {}
virtual void baz() = 0;
};
class foo final
{
public:
virtual ~foo() {}
char* bar;
void baz() noexcept override { bar = nullptr; }
};
int main()
{
foo f;
return 0;
}