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

Function IntegerCast

util/generic/cast.h:149–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147
148template <class TSmallInt, class TLargeInt>
149inline TSmallInt IntegerCast(TLargeInt largeInt) noexcept {
150 try {
151 return SafeIntegerCast<TSmallInt>(largeInt);
152 } catch (const yexception& exc) {
153 Y_ABORT("IntegerCast: %s", exc.what());
154 }
155}
156
157/* Convert given enum value to its underlying type. This is just a shortcut for
158 * `static_cast<std::underlying_type_t<EEnum>>(enum_)`.

Callers

nothing calls this directly

Calls 1

whatMethod · 0.45

Tested by

no test coverage detected