Add a concept for invocables with a return type

Because for some reason this is not part of the standard library.
This commit is contained in:
Robbert van der Helm
2021-05-19 23:08:36 +02:00
parent 57d7141681
commit 35cc47d021
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -277,7 +277,7 @@ class MainContext {
* that will cause them to stall indefinitely in this situation, but who
* knows which other plugins exert similar behaviour.
*/
template <typename F, typename P>
template <std::invocable F, invocable_returning<bool> P>
void async_handle_events(F handler, P predicate) {
// Try to keep a steady framerate, but add in delays to let other events
// get handled if the GUI message handling somehow takes very long.