I want to create the following types
using Function = std::function<Variant(int)>;
using Variant = std::variant<int, bool, Function>;
In Variant I need to have Function as well, but Function should return a Variant (by value). However I cannot find the right syntax. I was trying to forward-declare Function, but I'm not sure how to do this.
As far as I know, I should be able to write such a thing, because forward-declaration is usually enough regarding the return type of a function.