| 214 | } |
| 215 | |
| 216 | string DebugString() const { |
| 217 | return strings::StrCat( |
| 218 | "Variant<type: ", TypeName(), |
| 219 | " value: ", is_empty() ? "[empty]" : GetValue()->DebugString(), ">"); |
| 220 | } |
| 221 | |
| 222 | // Returns a pointer to the stored value if it is type T, or nullptr |
| 223 | // otherwise. |