final class in C++

In C++ 11, we can make the base class non-inheritable by using the final specifier. 
```
#include <iostream>
using namespace std;
 
class Base final{ };

class Derived : public Base { };
 
int main() {
  return 0;
}

// error: cannot derive from ‘final’ base ‘Base’ in derived type ‘Derived’
```