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:
23
Tests/Module/WriteCompilerDetectionHeader/main_bare.cpp
Normal file
23
Tests/Module/WriteCompilerDetectionHeader/main_bare.cpp
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user