So I need to represent, in C++, a structure like "a Value can be a bool, a string, a list of Values, or a map from string to Value"

This should be easy, something like:
class Value;
using String = std::string;
using List = std::vector;
using Map = std::unordered_map;

class Value {
// something tagged-union-like
};

However unordered_map can't have incomplete types as a parameter, even though it's totally possible T_T unordered_map is just pointers #cpp #programming

Side note: I would LOVE to be able to use C++'s native tagged unions: std::variant. But defining something recursive with std::variant is impossible because you can't forward declare an alias. I want to do:

declare_alias Value;
using String = std::string;
using List = std::vector;
using Value = std::variant;

But there is no way to do that. You can only forward declare classes, structs and functions. So I'm stuck wrapping the variant in a class. #cplusplus#cpp