+
+template<typename T>
+class RegisteredApplication: public Application
+{
+private:
+ class Starter: public Application::Starter
+ {
+ public:
+ Application *create_app(int argc, char **argv) { return new T(argc, argv); }
+ };
+
+ static Starter starter_;
+
+protected:
+ // Force the starter into existence
+ RegisteredApplication() { (void)starter_; }