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

Function LoadVariant

library/cpp/chromium_trace/saveload.cpp:100–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98
99template <class T, size_t... Is>
100void LoadVariant(IInputStream* in, TMemoryPool& pool, T& variant, std::index_sequence<Is...>) {
101 i8 tag = 0;
102 ::Load(in, tag);
103
104 Y_ENSURE_EX(tag >= 0 && size_t(tag) < std::variant_size_v<T>, TSerializeException() << "Invalid variant tag: " << tag);
105 (LoadAlternativeIf<Is>(in, pool, variant, tag), ...);
106}
107
108template <class T>
109void LoadVariant(IInputStream* in, TMemoryPool& pool, T& variant) {

Callers 1

LoadMethod · 0.85

Calls 2

TSerializeExceptionClass · 0.85
LoadFunction · 0.50

Tested by

no test coverage detected