| 90 | } |
| 91 | |
| 92 | void throwIfNotKind(Kind expected) const { |
| 93 | if (kind_ == expected) |
| 94 | return; |
| 95 | |
| 96 | std::string error = "Illegal cast to "; |
| 97 | error += kindAsString(expected); |
| 98 | error += "; type is actually "; |
| 99 | error += kindAsString(kind_); |
| 100 | throw std::runtime_error(std::move(error)); |
| 101 | } |
| 102 | |
| 103 | Kind kind_ = Kind::Empty; |
| 104 | Variant variant_ {}; |
nothing calls this directly
no outgoing calls
no test coverage detected