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

Function FindEnumFromStringImpl

util/draft/enum.h:23–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22template <class K1, class K2, class V>
23const V* FindEnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
24 for (size_t i = 0; i < arraySize; i++) {
25 if (entries[i].first == key) {
26 return &entries[i].second;
27 }
28 }
29 return nullptr;
30}
31
32// special version for const char*
33template <class V>

Callers 1

EnumFromStringImplFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected