1.这是我的课:
struct SymbolToken {
std::string name;
};
struct QuoteToken {
};
struct ConstantToken {
int value;
};
2.我有以下typedef:
typedef std::variant<SymbolToken, QuoteToken, ConstantToken> Token;
3. 我想写一个断言:
assert(Token{ConstantToken{4}} == Token{ConstantToken{4}}) // fine
assert(Token{ConstantToken{3}} == Token{ConstantToken{4}}) // exception
我该如何实施?