namespace override {
    class override {
    };

    class override_final { 
        ::override::override override; 
    public:
        virtual ::override::override & final() { 
            return override; 
        }
    };
}

namespace final {
    class final final : public override::override {
    };

    class final_override final : public override::override_final { 
        ::final::final override; 
    public: 
        ::final::final & final() override final {
            return override; 
        }
    };
}

Enjoy.

Edited 19:44 CEST – added namespaces and fixed naming to improve readability

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.