Currently we get the following warning due to the implicit conversion operator to Job<void>:
In file included from /home/chrigi/kdebuild/kube/source/kasync/autotests/asynctest.cpp:25: /home/chrigi/kdebuild/kube/source/kasync/src/async.h:646:5: warning: conversion function converting 'KAsync::Job<void>' to itself will never be used operator Job<void>(); ^ /home/chrigi/kdebuild/kube/source/kasync/src/job_impl.h:322:19: note: in instantiation of template class 'KAsync::Job<void>' requested here Job<Out, In ...>::operator Job<void>() ^ 1 warning generated.
I tried fixing it like so:
template< typename U = Out, typename = typename std::enable_if<!std::is_void<U>::value >::type > operator Job<void>() { return thenImpl<void>({[](){ return KAsync::null<void>(); }}, {}); }
But without success.
There also doesn't seem to be a compiler flag that could be tweaked to turn of the warning (or an attribute that could be used for that...).