**Use case**

```
Received exception from server (version 21.11.1):
Code: 36. DB::Exception: Received from localhost:9000. DB::Exception: Wrong index name. Cannot find index `test_pentagram` to drop.. (BAD_ARGUMENTS)

github-explorer.ru-central1.internal :) ALTER TABLE hackernews DROP INDEX text_pentagram
```

It did not show me the typo.
{
public:
    using Value = std::pair<std::string, T>;
    using Values = std::vector<Value>;
    using NameToValueMap = HashMap<StringRef, T, StringRefHash>;
    using ValueToNameMap = std::unordered_map<T, StringRef>;
private:
    Values values;
    NameToValueMap name_to_value_map;
    ValueToNameMap value_to_name_map;
    void fillMaps();
public:
    EnumValues(const Values & values_);
    const Values & getValues() const { return values; }
    auto findByValue(const T & value) const
    {
        const auto it = value_to_name_map.find(value);
        if (it == std::end(value_to_name_map))
            throw Exception{"Unexpected value " + toString(value) + " in enum", ErrorCodes::BAD_ARGUMENTS};
        return it;
    }
    
    const StringRef & getNameForValue(const T & value) const
    {
        return findByValue(value)->second;
    }
    
    bool getNameForValue(const T & value, StringRef & result) const