I am trying to represent a PDF object type in c++ using variants. A PDF object is one of the following:
BooleanIntegerRealStringNameStreamArray<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 compile because of the requirements of std::unordered_map (I think) http://coliru.stacked-crooked.com/a/699082582e73376e