Fix 'function converting Job<void> to itself will never be used' warning

Authored by dvratil on Mar 8 2017, 1:11 AM.

Description

Fix 'function converting Job<void> to itself will never be used' warning

For class Job<void> specialization the implicit conversion to Job<void>
opereator makes no sense and compilers (at least clang) warn about it.
To fix the warning we want to conditionally enable the operator only
for Job<T> class specialization where T != void. However we can't just
use std::enable_if because then instantiation of the operator template
would fail when constructing Job<void> class specialization explicitly,
which we do a lot. Instead we use std::conditional and implement it as
a conversion to a private incomplete type, which will never be used either,
but the compiler can't know it and thus can't warn about it.

Details