C++ Mutually Recursive Variant Type
问题 I am trying to represent a PDF object type in c++ using variants. A PDF object is one of the following: Boolean Integer Real String Name Stream Array<Object> Map<Object, Object> As you can see, the Object type is mutually recursive because the Array type would require a declaration of the Map type which would require a declaration of the Array type. How could I go abouts representing this type in c++? If a variant isn't the best way, what is? Here is what I have tried so far but it doesn't