Support app constructor arguments in app::main
This commit is contained in:
parent
6ec10e9463
commit
91de56753b
1 changed files with 5 additions and 3 deletions
|
|
@ -2,15 +2,17 @@
|
|||
|
||||
#include <psemek/log/log.hpp>
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace psemek::app
|
||||
{
|
||||
|
||||
template <typename App>
|
||||
int main() try
|
||||
template <typename App, typename ... Args>
|
||||
int main(Args && ... args) try
|
||||
{
|
||||
log::register_thread("main");
|
||||
|
||||
App app;
|
||||
App app(std::forward<Args>(args)...);
|
||||
|
||||
log::info() << "Running";
|
||||
app.run();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue