MCPcopy Create free account
hub / github.com/catboost/catboost / EnumFromStringImpl

Function EnumFromStringImpl

util/draft/enum.h:65–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64template <class K1, class K2, class V>
65const V* EnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
66 const V* res = FindEnumFromStringImpl(key, entries, arraySize);
67 if (res) {
68 return res;
69 }
70
71 ythrow TEnumNotFoundException() << "Key '" << key << "' not found in enum. Valid options are: " << PrintEnumItemsImpl(entries, arraySize) << ". ";
72}
73
74template <class K, class V>
75const K* EnumToStringImpl(V value, const std::pair<K, V>* entries, size_t arraySize) {

Callers 1

SetEnumFlagsFunction · 0.85

Calls 2

FindEnumFromStringImplFunction · 0.85
PrintEnumItemsImplFunction · 0.85

Tested by

no test coverage detected