I would expect juce::nullopt to work, but the two operands don’t match.
auto timsigFromHost = *getPlayHead()->getPosition()->getTimeSignature();
if (timsigFromHost != juce::nullopt)
{
... etc ....
}
and this also does not work, because the TimeSignature type cannot be converted to a bool:
if (auto timsigFromHost = *getPlayHead()->getPosition()->getTimeSignature())
{
... etc ....
}