| 50 | } |
| 51 | |
| 52 | std::string Variant::valueAsString() const { |
| 53 | if (m_type != VariantType::String) { |
| 54 | LOG_AND_THROW("Variant does not hold a string"); |
| 55 | } |
| 56 | return std::get<std::string>(m_value); |
| 57 | } |
| 58 | |
| 59 | // helper constant for the visitor below so we static assert we didn't miss a type |
| 60 | template <class> |
no outgoing calls