Не получается инициализировать drogon::app.registerController()
Есть такой код
drogon::app().getLoop()->runAfter(15, []() { drogon::app().quit(); });
drogon::app().setLogLevel(trantor::Logger::kDebug);
drogon::app().run();
drogon::app().registerController(app);
LOG_INFO << "bye!";
return 0;
В документации drogon написано так
* The second template parameter must be explicitly set to false to disable
* automatic creation.
* And then user can create and register it somewhere as follows:
* @code
auto ctrlPtr=std::make_shared<ApiTest>("hello world");
drogon::app().registerController(ctrlPtr);
@endcode
* This method should be called before calling the app().run() method.
*/
и вроде я делаю все правильно, как показывает пример выше, но выскакивает ошибка
_static_assert failed: 'Controllers created and initialized automatically by
drogon cannot be registered here'_
что делать?мучаюсь