Commit 6d3e41e9 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

EventManager: Accept forward references to perfect forward the event handler

parent 2cb7083c
This diff is collapsed.
......@@ -24,6 +24,12 @@ int main(int ac, char** av)
eventManager->onPlaying([&media]() {
std::cout << media.mrl() << " is playing" << std::endl;
});
/*
* Should trigger static_assert:
*
* eventManager->onPlaying([](std::string){});
* eventManager->onPlaying([] { return 0;} );
*/
mp.play();
std::this_thread::sleep_for( std::chrono::seconds( 10 ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment