Workaround for gcc and msvc issues with multiple inherited operator()

Additionally, use `_void_guard<R>()` instead of `_void_guard<R>{}` to avoid a clang warning about the expression result being unused.