Add C++11 compiler support detection feature

This is currently copied from http://quickgit.kde.org/index.php?p=scratch%2Fdakon%2Fcmake-cxx11.git
but there is a chance that in future it will be merged into CMake proper.
This commit is contained in:
Matt Williams
2012-11-23 11:34:25 +00:00
parent c981ed2706
commit a24fcc0c03
22 changed files with 443 additions and 0 deletions

View File

@ -0,0 +1,25 @@
class base {
public:
virtual int foo(int a)
{ return 4 + a; }
virtual int bar(int a) final
{ return a - 2; }
};
class sub final : public base {
public:
virtual int foo(int a) override
{ return 8 + 2 * a; };
virtual int bar(int a)
{ return a; }
};
class impossible : public sub { };
int main(void)
{
base b;
sub s;
return 1;
}